|
Subject:
|
VBA Address
|
|
Posted By:
|
Fin
|
Post Date:
|
1/11/2006 10:45:31 AM
|
Hi,
I'm trying to get VBA to remember a cell address so that I can return to it after entering data below that row. For example, if I have a table full of data and then add a number of rows of data directly below it, I want to know where the new data starts so that I can adjust accordingly before I sort the entire table and save it ready for the next addition of new data.
Thought it might have gone a little like this but I'm wrong.
Sub Macro4()
Range("C10").Select Range("A65001").Value = Selection.Address() Dim Address As Variant Address = Range("A65001").Value Address.Select End Sub
Please can someone help me.
Many thanks,
Fin.
|
|
Reply By:
|
mjppaba
|
Reply Date:
|
1/11/2006 10:49:53 AM
|
Hi Fin,
Sub Macro4() Dim myAddress Range("C10").Select myAddress = Selection.Address Range(myAddress).Select End Sub
should sort your problems,
cheers
Matt
|
|
Reply By:
|
Fin
|
Reply Date:
|
1/11/2006 11:43:20 AM
|
Thanks Matt, works a treat.
|