VB Code line for determining column

K

k483

What's the correct syntax for a VB code line that returns the
current column (or row)?

For example
If Worksheets("currentsheet").column=1 then ' is the curren
column A?
End if

Thank
 
C

Cesar Zapata

Im bit confuse about your post.


MsgBox ActiveCell.Row ' ' gives you the row number
MsgBox ActiveCell.Column ' gives you the column number a =1 b =2 ... etc

MsgBox Split(ActiveCell.Address, "$")(1) ''For Column Letter ' will get
you the column letter.





Hope it helps
 
Top