VB6.0用掲示板の過去のログ(No.1)−VBレスキュー(花ちゃん)
[記事リスト] [新規投稿] [新着記事] [ワード検索] [過去ログ] [管理用]

投稿日: 2003/10/23(Thu) 22:11
投稿者花ちゃん
Eメール
URL
タイトルRe: エクセルで選択したセルの範囲を取得する方法  

使用目的によっては違う方法もあると思うのですが。

    Dim RowStart As Long
    Dim RowEnd   As Long
    Dim ColStart As Long
    Dim ColEnd   As Long
    RowStart = xlApp.Selection.Row
    RowEnd = xlApp.Selection.Rows.Count - 1
    ColStart = xlApp.Selection.Column
    ColEnd = xlApp.Selection.Columns.Count - 1
    RowEnd = RowStart + RowEnd
    ColEnd = ColStart + ColEnd
    MsgBox "選択範囲は" & RowStart & "行目の" & ColStart & "列目から" & _
                          RowEnd & "行目の" & ColEnd & "列目までです"


- 関連一覧ツリー (★ をクリックするとツリー全体を一括表示します)

- 返信フォーム (この記事に返信する場合は下記フォームから投稿して下さい)

- Web Forum -