VBA top/left/right/bottom cell of selection?« Wróć do listy pytań
VBA top/left/right/bottom cell of selection?
|
▲ ▼ |
With Selection MsgBox "1. Top left cell = " & .Cells(1).Address(0, 0) & vbLf & _ "2. Bottom left cell = " & .Cells(.Rows.Count, 1).Address(0, 0) & vbLf & _ "3. Top right cell = " & .Cells(1, .Columns.Count).Address(0, 0) & vbLf & _ "4. Bottom right cell = " & .Cells(.Cells.Count).Address(0, 0) End With |