ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Moving to Column A using a macro (https://www.excelbanter.com/excel-discussion-misc-queries/196446-moving-column-using-macro.html)

Victor Delta[_2_]

Moving to Column A using a macro
 
I have written an Excel macro but, before it runs, need to ensure the active
cell is in Column A (of the appropriate row).

Can anyone please tell me how to do this at the start of the macro. I have
searched all over the place for the answer but cannot find it. I could use
the offset command but the number of cells to the left will vary each time.
I thought there might be a Home command or something similar?

Thanks,

V


Dave Peterson

Moving to Column A using a macro
 
Here are a couple of ways.

activesheet.cells(activecell.row,"A").select
or
activecell.entirerow.cells(1).select

Victor Delta wrote:

I have written an Excel macro but, before it runs, need to ensure the active
cell is in Column A (of the appropriate row).

Can anyone please tell me how to do this at the start of the macro. I have
searched all over the place for the answer but cannot find it. I could use
the offset command but the number of cells to the left will vary each time.
I thought there might be a Home command or something similar?

Thanks,

V


--

Dave Peterson

Victor Delta[_2_]

Moving to Column A using a macro
 
"Dave Peterson" wrote in message
...
Here are a couple of ways.

activesheet.cells(activecell.row,"A").select
or
activecell.entirerow.cells(1).select


Dave

Many thanks,

V



All times are GMT +1. The time now is 11:10 AM.

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