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

How to get the active cell address?
eg. Click A1 on Excel sheet1 and VBA code get this active
cell value "A1" and display in A2 cell.

Thanks in advance.

d
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default How to get the active cell address?

Try it!

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim celAdr As String
Dim lRow As Long, pos As Long, i As Long

celAdr = Target.Address
lRow = Target.Row + 1

Do
pos = InStr(pos + 1, celAdr, "$")
If pos 0 Then i = pos

Loop Until pos = 0

MsgBox Left(celAdr, i) & lRow

End Sub

losmac

Uzytkownik "d" napisal w wiadomosci
...
How to get the active cell address?
eg. Click A1 on Excel sheet1 and VBA code get this active
cell value "A1" and display in A2 cell.

Thanks in advance.

d



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
following the active cell address without recalc haystack Excel Worksheet Functions 3 November 13th 08 01:48 AM
How can I use the active cell address as a value mohavv Excel Discussion (Misc queries) 2 April 18th 08 06:16 AM
active cell address with worksheet function Stefi Excel Worksheet Functions 3 November 26th 07 03:23 PM
Get Address of Active Cell LarryL Excel Discussion (Misc queries) 3 February 16th 07 10:02 PM
Find address of active cell Dave Excel Worksheet Functions 5 September 6th 06 06:43 PM


All times are GMT +1. The time now is 04:39 PM.

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

About Us

"It's about Microsoft Excel"