Same code crashes XL in one wkbk, not other??

Gahagan

New Member
Joined
Feb 27, 2002
Messages
12
Hi;

In two separate workbooks, I have the following:

In the Workbook_Open event:
frmSplash.show

In frmSplash's code:
Application.OnTime Now + TimeValue("00:00:02"), "KillForm"

In a module:
Sub KillForm()
unload frmSplash
End Sub

Again, in one workbook it works beautifully, in another it crashes XL. When I step through everything it works fine, but on a cold open it crashes. I get 'Object invoked has disconnected from one of its clients', runtime error 9, I/O Device Error, Path/File Error, etc. I can recreate it every time - and can only open it now by holding down the SHIFT key while doing so...

But the SAME code works PERFECTLY in a different workbook! I am completely lost here. If anyone has any ideas PLEASE let me know.

(Is there a limit to how many modules or forms one VBAPRoject can have??)

Thanks for ANY help...
Gahagan
This message was edited by Gahagan on 2002-04-06 14:33
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi

from knowledge i have suffered on Erro 9 its looking for something, as you point out poss a file that moved named different or missing...

could be anything... look into the links, hyper's and vlookup anything thats going serch outside that wkbk and also scan ALL codes and see if one is calling something just in case..

will be something small and sill but hard to fine.

Any Outlooks connections....
 
Upvote 0
Hi Gahagan

Not sure what the answer is to your problem but these things can happen in Excel for no apparent reason. Sometimes it helps to Export all modules and UserForms to your hardrive, Right click on a sheet name tab, select all sheets, then right click again and Copy all sheets to a new workbook. Then save this new Workbook and Import all modules you Exported.

It may also help to re-name your UserForm.

Last, but my know means least try the information here:
http://search.support.microsoft.com...Type=ALL&Titles=false&numDays=&maxResults=150
 
Upvote 0
Hi Gahagan

Don't know if this will help in any way but your experience seems awefully familiar.
I had a very similar problem with a macro that runs perfectly on a machine using NT4 with Excel 2000 but crashed xl when run on a machine using Windows 2000 and Excel 2000. The run time message was also 'Object invoked has disconnected from one of its clients'.
I tracked this down to a line of code using cut with destination:= .Copy with destination:= seemed okay but it definately didn't like using cut without going through all the cell selecting process.

regards
Derek
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top