Absolute vs. Relative reference


Posted by M Perry on June 14, 2000 12:34 PM

I'd like the macro I'm recording to go to a certain cell - say A3 - and set a range (to be used later in the macro) by choosing Shift/End/Down. The problem with the way I am doing this is that the VBA code in the macro records the absolute reference [Range("A3:A2660").Select]. Selecting the "relative reference" button does not solve this. Does anyone have any suggestions? Thanks!



Posted by JAF on June 16, 0100 1:20 AM

MP

The code you need is as follows:

Sub select_variable_range()
Range("A3").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End Sub


JAF