Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi. I want to fetch the address of the active cell so that I can use the
reference to build a formula. I have tried some, but so far I only got the value of the active cell, and that doesn't help me at all. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think ActiveCell.Address is what you are looking for.
Example:- Dim strAddress as String strAddress = ActiveCell.Address Use Replace function if you want to remove $ signs. Regards, OssieMac "Jørgen Andreassen" wrote: Hi. I want to fetch the address of the active cell so that I can use the reference to build a formula. I have tried some, but so far I only got the value of the active cell, and that doesn't help me at all. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks mate, that did the trick. I declared the variable wrong... :|
OssieMac skrev: I think ActiveCell.Address is what you are looking for. Example:- Dim strAddress as String strAddress = ActiveCell.Address Use Replace function if you want to remove $ signs. Regards, OssieMac "Jørgen Andreassen" wrote: Hi. I want to fetch the address of the active cell so that I can use the reference to build a formula. I have tried some, but so far I only got the value of the active cell, and that doesn't help me at all. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'Depending on exactly what you are doing
'the following can also be used for the 'address of the active cell. Dim rowNumber As Single Dim colNumber As Single rowNumber = ActiveCell.Row colNumber = ActiveCell.Column Cells(rowNumber, colNumber) = "This is active cell" regards, OssieMac "OssieMac" wrote: I think ActiveCell.Address is what you are looking for. Example:- Dim strAddress as String strAddress = ActiveCell.Address Use Replace function if you want to remove $ signs. Regards, OssieMac "Jørgen Andreassen" wrote: Hi. I want to fetch the address of the active cell so that I can use the reference to build a formula. I have tried some, but so far I only got the value of the active cell, and that doesn't help me at all. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you don't want the $'s, use this:
strAddress = ActiveCell.Address(0, 0) -- Gary "OssieMac" wrote in message ... I think ActiveCell.Address is what you are looking for. Example:- Dim strAddress as String strAddress = ActiveCell.Address Use Replace function if you want to remove $ signs. Regards, OssieMac "Jørgen Andreassen" wrote: Hi. I want to fetch the address of the active cell so that I can use the reference to build a formula. I have tried some, but so far I only got the value of the active cell, and that doesn't help me at all. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set a variable to the active cell | Excel Discussion (Misc queries) | |||
Active cell as range | Excel Programming | |||
name variable with 3 first characters of active cell | Excel Programming | |||
Excel VBA-use variable in active cell formula problem | Excel Programming | |||
value of active cell into a variable | Excel Programming |