Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default ActiveWorkbook.Sheets.Select

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default ActiveWorkbook.Sheets.Select

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default ActiveWorkbook.Sheets.Select

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select the same cell in sheets 2 & sheets 3 Oggy Excel Programming 0 January 8th 07 08:02 PM
select sheets snax500[_2_] Excel Programming 6 June 8th 05 04:48 AM
Adding a sheets name to the worksheets that are copied over from an addin file to the activeworkbook KimberlyC Excel Programming 2 May 7th 05 04:10 AM
ActiveWorkbook.Sheets.Count yankee428 Excel Programming 5 November 10th 04 06:22 AM
select a1 on all sheets Piers Clinton-Tarestad Excel Programming 1 October 1st 03 08:34 PM


All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"