M Mario Jun 2, 2004 #1 I need to know how to read a selected excel cell's position from a macro. Thank you Rgds
J JE McGimpsey Jun 2, 2004 #2 One way: With ActiveCell MsgBox "The active cell's position is:" & vbNewLine & _ "Left: " & .Left & ", Top: " & .Top & vbNewLine & _ "Width: " & .ColumnWidth & ", Height " & .Height End With
One way: With ActiveCell MsgBox "The active cell's position is:" & vbNewLine & _ "Left: " & .Left & ", Top: " & .Top & vbNewLine & _ "Width: " & .ColumnWidth & ", Height " & .Height End With
P Peo Sjoblom Jun 2, 2004 #3 ActiveCell.Address Sub test() MsgBox ActiveCell.Address End Sub -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom
ActiveCell.Address Sub test() MsgBox ActiveCell.Address End Sub -- For everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom
C CLR Jun 3, 2004 #4 Thanks JE and Peo.............putting both of your things together, I came up with this for my personal stash.......... Sub WheresTheCell() With ActiveCell MsgBox "Active Cell Address is " & ActiveCell.Address & vbNewLine & vbCr & _ "Width: " & .ColumnWidth & ", Height " & .Height End With End Sub Vaya con Dios, Chuck, CABGx3
Thanks JE and Peo.............putting both of your things together, I came up with this for my personal stash.......... Sub WheresTheCell() With ActiveCell MsgBox "Active Cell Address is " & ActiveCell.Address & vbNewLine & vbCr & _ "Width: " & .ColumnWidth & ", Height " & .Height End With End Sub Vaya con Dios, Chuck, CABGx3