Selected cell position

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

I need to know how to read a selected excel cell's
position from a macro.
Thank you
Rgds
 
One way:

With ActiveCell
MsgBox "The active cell's position is:" & vbNewLine & _
"Left: " & .Left & ", Top: " & .Top & vbNewLine & _
"Width: " & .ColumnWidth & ", Height " & .Height
End With
 
ActiveCell.Address


Sub test()
MsgBox ActiveCell.Address
End Sub


--
For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
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
 
Back
Top