Home |
Search |
Today's Posts |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help! Macro to select all sheet from AA to ZZ
When I go into debug, the highlighed error out of range error is on the last line
Sheets(shArr).Selec |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help! Macro to select all sheet from AA to ZZ
Did you change these lines:
Set FirstSheet = Sheets("aa") Set LastSheet = Sheets("zz") If you did, then you'll want to post the code you used. (Don's code worked fine for me.) Did you know that you can do the same thing manually by clicking on the AA worksheet tab, then shift-clicking on the ZZ worksheet tab? Elaine Roden wrote: When I go into debug, the highlighed error out of range error is on the last line Sheets(shArr).Select -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help! Macro to select all sheet from AA to ZZ
Could have something to do with
ThisWorkbook.Sheets try For Each sh In .Sheets or For Each sh In activeworkbook.Sheets -- Don Guillett SalesAid Software "Elaine Roden" wrote in message ... Why is it that every time I type a reply to you, something new occurs to me to try right after I click send? I just copied the macro into the particular worksheet VB and it works, it must be something to do with the fact that I was storing it in the personal macro library instead of the worksheet macro library. Any Ideas? Elaine |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help! Macro to select all sheet from AA to ZZ
And just add to Don's excellent detective work:
ThisWorkbook refers to the workbook containing the code. If you put the code in your personal.xls workbook, then those sheets would have to be that personal.xls workbook. By suggesting Activeworkbook, Don says to run the code against the, er, activeworkbook. (now that last sentence was quite helpful, huh?) Elaine Roden wrote: Why is it that every time I type a reply to you, something new occurs to me to try right after I click send? I just copied the macro into the particular worksheet VB and it works, it must be something to do with the fact that I was storing it in the personal macro library instead of the worksheet macro library. Any Ideas? Elaine -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select dynamic data in 2 columns, and repeat macro to next sheet | Excel Discussion (Misc queries) | |||
Macro to go to select sheet | Excel Discussion (Misc queries) | |||
macro sheet select | Excel Discussion (Misc queries) | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions | |||
On Sheet select Macro | Excel Programming |