Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to select all sheets in my workbook. In the past, I've always
used ActiveWorkbook.Sheets.Select. For some reason, this time I'm getting "Run-time error '1004'". I've never seen this in the past. Any other ways to select all sheets? Anyone have an idea why it would work in other workbooks, but not this one? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It would appear to be an anomaly
If it 's preventing you from continuing ,just simply code it into an error handler. For Example : On Error goto err_Handler ....code etc err_Handler: If err. number = 1004 then Exit Sub End if HTH Regards SysAccountant "StephanieH" wrote: I'm trying to select all sheets in my workbook. In the past, I've always used ActiveWorkbook.Sheets.Select. For some reason, this time I'm getting "Run-time error '1004'". I've never seen this in the past. Any other ways to select all sheets? Anyone have an idea why it would work in other workbooks, but not this one? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That somewhat worked. It would allow me to skip the step, but obviously it
messes up everything that takes place after that since it was a necessary step. I ended up just rerecording the piece to select each sheet through an array. "SysAccountant" wrote: It would appear to be an anomaly If it 's preventing you from continuing ,just simply code it into an error handler. For Example : On Error goto err_Handler ...code etc err_Handler: If err. number = 1004 then Exit Sub End if HTH Regards SysAccountant "StephanieH" wrote: I'm trying to select all sheets in my workbook. In the past, I've always used ActiveWorkbook.Sheets.Select. For some reason, this time I'm getting "Run-time error '1004'". I've never seen this in the past. Any other ways to select all sheets? Anyone have an idea why it would work in other workbooks, but not this one? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select the same cell in sheets 2 & sheets 3 | Excel Programming | |||
select sheets | Excel Programming | |||
Adding a sheets name to the worksheets that are copied over from an addin file to the activeworkbook | Excel Programming | |||
ActiveWorkbook.Sheets.Count | Excel Programming | |||
select a1 on all sheets | Excel Programming |