Selected cell position

M

Mario

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

JE McGimpsey

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

ActiveCell.Address


Sub test()
MsgBox ActiveCell.Address
End Sub


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

Regards,

Peo Sjoblom
 
C

CLR

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top