Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mat Mat is offline
external usenet poster
 
Posts: 1
Default Get active cell?

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Get active cell?

Hi Mat
try
sub foo()
dim rng as range
set rng = Activecell
'to get the value use
msgbox rng.value
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

Mat wrote:
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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Get active cell?

Mat

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

Gord Dibben Excel MVP

On Sat, 21 Feb 2004 10:45:33 -0800, "Mat" wrote:

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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Get active cell?

Thanks, got it working now :)

"Mat" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
set the background color of the current cell(active cell) kang New Users to Excel 2 July 31st 07 04:48 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 13th 04 11:52 PM
Sum to active cell GregR Excel Discussion (Misc queries) 4 December 10th 04 10:01 PM


All times are GMT +1. The time now is 10:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"