0
私はDBに問い合わせるExcelテーブルを持っています。返す行の数は変動します。画面に合わせて自動サイズ変更テーブル
テーブル全体が常に画面に収まるように、行の量が変更されたときにテーブルのサイズを自動的に変更する方法を知っている人はいますか?
私はDBに問い合わせるExcelテーブルを持っています。返す行の数は変動します。画面に合わせて自動サイズ変更テーブル
テーブル全体が常に画面に収まるように、行の量が変更されたときにテーブルのサイズを自動的に変更する方法を知っている人はいますか?
ズームを参照しているように聞こえます。この便利なサブのすべてのクレジットはChip Pearsonになります。
使用例:call ZoomToRange(activesheet.cells(1,1).currentregion, true)
Sub ZoomToRange(ByVal ZoomThisRange As Range, _
ByVal PreserveRows As Boolean)
'http://www.cpearson.com/excel/zoom.htm
Dim Wind As Window
Set Wind = ActiveWindow
'
' Put the upper left cell of the range in the top-left of the screen.
'
Application.Goto ZoomThisRange(1, 1), True
With ZoomThisRange
If PreserveRows = True Then
.Resize(.Rows.Count, 1).Select
Else
.Resize(1, .Columns.Count).Select
End If
End With
With Wind
.Zoom = True
.VisibleRange(1, 1).Select
End With
End Sub
WOW。これを共有してくれてありがとう。 – eggwhites