Activate method of Worksheet class fails in Excel 2000

C

Chris Bloom

I'm having trouble getting a distributed macro to work on a few
machines. The macro fails on the first line which reads:

Worksheet(1).Activate

I've also tried using the Sheets collection, but still the same error.

The computers in question run the following versions of excel:

Excel 2000 (9.0.6926 SP-3)
Excel 2000 (9.0.3821 SR-1)
Excel 2000 (9.0.2720)

I thought it might be a versioning issue (I developed the macro in Excel
2002), but one other instance of Excel 2000 (9.0.6926 SP-3) runs the
macro fine.

Does anyone know if something would block the Activate method in Excel?
The worksheet in question is actually a tab-delimited file that is
opened with excel.

Chris Bloom
 
D

Dave Peterson

If you put:

msgbox worksheets(1).name

right before it, do you get what you expect?

If I had a workbook with worksheets 1-8 (left to right), I could hide 1-7 and
worksheets(1).name refered to sheet1--but sheet8 was active (xl2003).

But if that workbook were hidden and no active workbook, then I got an error.
 

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

Top