excel macros

J

John Morris

In early versions of excel you could move to a new cell
with the command SELECT("RC[1]"). What is the command in
Visual Basic macros for Excel XP. HELP!!
 
B

Beto

John said:
In early versions of excel you could move to a new cell
with the command SELECT("RC[1]"). What is the command in
Visual Basic macros for Excel XP. HELP!!

In VBA:

ActiveCell.Offset(r,c).Select

Where r (row) and c (column) are numbers or evaluate to numbers.
Regards,
 
J

John Morris

Thanks for your help. That did the trick for one part of my macro but I
need to move the back to column A and that formula will not take a
negative number. Any Ideas?



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

John Wilson

John,

What Beto gave you should work but if you're always looking to
go back to Column "A" you might just try:

Range("A" & Activecell.Row).Select

John
 
B

Beto

John said:
Thanks for your help. That did the trick for one part of my macro but I
need to move the back to column A and that formula will not take a
negative number. Any Ideas?

AFAIK, you *can* use a negative integer. I succesfully tried giving
negative offsets.
Regards,
 
Top