選択されているシートを参照する(SelectedSheets プロパティ)
2016/01/12
SelectedSheets プロパティ
選択されているすべてのシートをあらわす Sheets コレクション を返します。値の取得のみ可能です。
【書式】
object.SelectedSheets
引数・戻り値
- object ・・・ 対象となる Window オブジェクトを指定します。
SelectedSheets プロパティ 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 9 10 11 |
Sub Sample_SelectedSheets() '「Sheet1」「Sheet2」を選択 Worksheets(Array("Sheet1", "Sheet2")).Select '選択されているシートの数を表示 MsgBox ActiveWindow.SelectedSheets.Count End Sub |
実行結果
関連記事
-
-
ウィンドウを整列(Windows.Arrange メソッド)
ウィンドウを整列(Windows.Arrange メソッド) Windows コ …
-
-
並べて比較(CompareSideBySideWith,SyncScrollingSideBySide,BreakSideBySide)
並べて比較(CompareSideBySideWith メソッド) Compar …
-
-
セルのコメントを印刷(PageSetup.PrintComments プロパティ)
PageSetup.PrintComments プロパティ PageSetup. …
-
-
Excel を全画面表示(DisplayFullScreen プロパティ)
DisplayFullScreen プロパティ DisplayFullScree …
-
-
スクロール(LargeScroll メソッド、Smallscroll メソッド)
ワークシートをスクロールする ワークシートをスクロールするには、LargeScr …
-
-
印刷実行前に総ページ数を取得(ExecuteExcel4Macro メソッド)
印刷の総ページ数を取得(ExecuteExcel4Macro メソッド) Exc …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
印刷の倍率(拡大/縮小)(PageSetup.Zoom プロパティ)
PageSetup.Zoom プロパティ PageSetup.Zoom プロパテ …
-
-
印刷:余白を設定 TopMargin,BottomMargin,LeftMargin,RightMargin,HeaderMargin,FooterMargin
余白を設定する 余白を設定する単位は、pt(ポイント:約 0.03528 cm) …
-
-
印刷のタイトル行、タイトル列を設定(PrintTitleRows,PrintTitleColumns)
PageSetup.PrintTitleRows プロパティ PageSetup …
