Get active cell?

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

Hello,
I'm building a simple search function in my workbook. I
have no problem in locating specified text, but I do not
know how to 'get' the location of the current cell, I
tried:

CellMatch = ActiveCell

But, alas, this simply assigns the value of the currently
selected cell to CellMatch. I want the location, "A2" for
example.
Thanks in advance
Mat.
 
Hi Mat
try
sub foo()
dim rng as range
set rng = Activecell
'to get the value use
msgbox rng.value
end sub
 
Mat

Sub gronk()
Set currcel = Application.ActiveCell
MsgBox currcel.Address
End Sub

Gord Dibben Excel MVP
 
Back
Top