ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel macros (https://www.excelbanter.com/excel-programming/285874-excel-macros.html)

John Morris

excel macros
 
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!!

Beto[_3_]

excel macros
 
John Morris wrote:
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,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.


John Morris

excel macros
 
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!

John Wilson

excel macros
 
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

"John Morris" wrote in message
...
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!




Beto[_3_]

excel macros
 
John Morris wrote:

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,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.



All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com