ActiveWorkbook.Sheets.Select

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top