Archive of Mr Excel Message Board
Back to Excel VBA archive index
Back to archive home
Get cell address with VBA without absolute addressPosted by MELISSA on February 01, 2002 11:41 AM
I have a line of code that creates a link to another sheet but it comes back with an absolute reference.
Here's the line:
ActiveCell.Formula = "=" & "BUDGET" & "!" & cellAdd
(cellAdd is a variable) It works but
it returns a formula like this =BUDGET!$A$1
I need it like this =BUDGET!A1
How do I get it without the $ signs
|Check out our Excel VBA Resources
Re: Get cell address with VBA without absolute addressPosted by Ivan F Moala on February 01, 2002 1:15 PM
Define your celladd as;
cellAdd = ActiveCell.Offset(1, 0).Address(False, False)
The 2 falses indicating row & column Absolute
Re: Get cell address with VBA without absolute addressPosted by Melissa on February 01, 2002 5:37 PM
Thank you so much Ivan
It worked perfectly
This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store
to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.