![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Location: Presque Isle, Maine, USA
Posts: 12
|
I imported a file *.cls which was a 'ThisWorkbook' object in another project in order to copy the code (don't ask why). In doing so I forgot to then remove the imported one. Now, there are two 'ThisWorkbook' objects, and XL 97 crashes whenever I open the workbook. For whatever reason, it doesn't crash in XL 2002, which is what I'm (trying) to develop this app in.
Does anyone know a way to get into the guts of this project and remove the second 'ThisWorkbook' object?? Thank you SO much for any help, Gahagan |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
first thing. if you cant open a up the owrkbook then open a blankworkbook and isable the macros.
then go into your VBA and objects property and delete the macro from in there. if the macro is on a button then make sure the buttons address doesnt read -workbook!macro1 it should just have the macro name. (hope this helps a bit) |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Location: Presque Isle, Maine, USA
Posts: 12
|
I tried that too, but thanks!
Usually I would right-click the object and click 'remove x...' but that option is disabled for the 2nd 'ThisWorkbook' object. 2002 doesn't allow programmatic removal of VBComponents through the VBA Extensible reference; 97 does but only if the Workbook would open long enough to do it...! AAAHHHH! I guess I'll start over. Thanks anyway! Gahagan |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
I am a 97 user,
and find that some of my macros intermoittently reopen the current file. and then my excel crashes too. the only solution i found was to make sure i chenged the macro link so as not to include the file name and then save the change. sorry. I have no ideas.. 97 deffinitely has bugs. All the best. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|