Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

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

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    Presque Isle, Maine, USA
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 ]

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

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

    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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/...maxResults=150



  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,584
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •