現在選択されているセルを参照(RangeSelection プロパティ)
RangeSelection プロパティ
実際に何が選択されているかにかかわらず、Range オブジェクト(セル)を参照・操作する場合に使用します。
【書式】
object.RangeSelection
引数・戻り値
- object ・・・ 対象となる Window オブジェクトを指定します。
RangeSelection プロパティ 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 9 10 11 |
Sub Sample_RangeSelection() '選択されているセル範囲のアドレスを表示 '(※ 図形がアクティブな状態) MsgBox ActiveWindow.RangeSelection.Address End Sub |
実行結果
関連記事
-
-
AutoFilter オブジェクト(メソッド・プロパティ)
AutoFilter.ShowAllData メソッド AutoFilter.S …
-
-
文字の向きを表す値を取得・設定する(Orientation プロパティ)
Orientation プロパティ Orientation プロパティで、文字列 …
-
-
セル幅・高さの既定値(StandardHeight プロパティ・StandardWidth プロパティ)
StandardHeight プロパティ・StandardWidth プロパティ …
-
-
網かけ(パターン)の取得・設定(Pattern プロパティ)
網かけ(パターン)を取得・設定する セルの背景に網かけ(パターン)を設定したり、 …
-
-
セルの表示形式を設定・取得する(NumberFormat プロパティ)
NumberFormat プロパティ NumberFormat プロパティは、現 …
-
-
オートフィルタの設定と解除(AutoFilter メソッド)
AutoFilter メソッド オートフィルタを設定する場合、AutoFilte …
-
-
文字列の横位置を取得・設定する(HorizontalAlignment プロパティ)
HorizontalAlignment プロパティ HorizontalAlig …
-
-
入力規則(リストで制限する)Validation.Add メソッド
ドロップダウンリストで入力値を制限 Validation.Add メソッド(また …
-
-
コメントの設定(Comments, Comment, AddComment, ClearComment)
コメントの設定 セルにコメントを新規に挿入するには、AddComment メソッ …
-
-
オートフィルタ(日付による抽出)AutoFilter メソッド
日付で、抽出する(AutoFilter メソッド) 【書式】 object.Au …
- PREV
- 文字列:定数(改行・タブ)
- NEXT
- 入力規則(Validation オブジェクト)
