Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Activate method of Worksheet class fails in Excel 2000
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 |
#2
|
|||
|
|||
Worksheets(1).Activate
you need the "s". "Chris Bloom" wrote in message ... 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 |
#3
|
|||
|
|||
Sorry, that was a typo. It is in the macro as "Worksheets"
Chris Bloom Bob Umlas wrote: Worksheets(1).Activate you need the "s". "Chris Bloom" wrote in message ... 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 |
#4
|
|||
|
|||
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. Chris Bloom wrote: Sorry, that was a typo. It is in the macro as "Worksheets" Chris Bloom Bob Umlas wrote: Worksheets(1).Activate you need the "s". "Chris Bloom" wrote in message ... 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel worksheet linking | Excel Worksheet Functions | |||
Rename Excel Worksheet | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
How do I replace a worksheet with another worksheet in excel | Excel Worksheet Functions | |||
Need to remove a password that noone placed on Excel worksheet. | Excel Worksheet Functions |