Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to loop thru sheets & return to a1 cell
I am a newbie. I'm trying to write a macro to loop through all of the sheets
in a workbook and return the cursor to the home (A1) position. Seems like it should be fairly simple to me, but I just can't get it to work. Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to loop thru sheets & return to a1 cell
Try this,
Sheets.Select Range("a1").Select sheets(1).select Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ (Excel Add-ins) *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to loop thru sheets & return to a1 cell
Set sh = activesheet For Each sh1 In Worksheets.Count sh1.ACtivate Range("A1").Select Next sh1 sh.Activate -- HTH RP (remove nothere from the email address if mailing direct) "CassieM" wrote in message ... I am a newbie. I'm trying to write a macro to loop through all of the sheets in a workbook and return the cursor to the home (A1) position. Seems like it should be fairly simple to me, but I just can't get it to work. Thanks for your help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to loop thru sheets & return to a1 cell
try this. No loop
Sub fixsheets() Sheets.Select Range("a1").Select Sheet1.Select End Sub -- Don Guillett SalesAid Software "CassieM" wrote in message ... I am a newbie. I'm trying to write a macro to loop through all of the sheets in a workbook and return the cursor to the home (A1) position. Seems like it should be fairly simple to me, but I just can't get it to work. Thanks for your help. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to loop thru sheets & return to a1 cell
Thank you all so much. I can see my beginner's error now!
"Don Guillett" wrote: try this. No loop Sub fixsheets() Sheets.Select Range("a1").Select Sheet1.Select End Sub -- Don Guillett SalesAid Software "CassieM" wrote in message ... I am a newbie. I'm trying to write a macro to loop through all of the sheets in a workbook and return the cursor to the home (A1) position. Seems like it should be fairly simple to me, but I just can't get it to work. Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return information in one cell based on search in other sheets | Excel Discussion (Misc queries) | |||
return same cell value from numerous sheets | Excel Worksheet Functions | |||
Return a blank cell instead of a zero value for two linked sheets. | Excel Discussion (Misc queries) | |||
Return all sheets to cell A1 | Excel Discussion (Misc queries) | |||
Loop through workbooks in a folder and return the value of cell M43 | Excel Programming |