+ Reply to Thread
Results 1 to 1 of 1

VBA for Excel 2000 file is corrupt

  1. #1
    Registered User
    Join Date
    05-26-2005
    Posts
    4

    VBA for Excel 2000 file is corrupt

    Hello,

    I have a strange thing.
    There are different functions which are creating some excel sheets, in these excel sheets is temporarily data created and after the create the sheets are deleted.

    [VBA]
    With Workbooks(Substn_WB)
    .Worksheets("temp_KV").Delete
    .Worksheets("temp_CBTYP").Delete
    .Worksheets("temp_XFMR").Delete
    .Worksheets("temp_LINE").Delete
    .Worksheets("temp_DCLN").Delete
    End With
    [/VBA]

    The temporarily data is used for three existing sheets which where before the create and after the create still there. If the excel file is closed by:

    [VBA] Workbooks("BNV.xls").Close savechanges:=TRUE [/VBA]

    I open the file with excel, I get the following message (see my attachement). I click oke and Excel is crashing, all the excel windows are being closed. If I try to open it again I get the message that the file is locked. I see in the task manager that the Excel proces is still running. I stop the excel process with the task manager. If I now try to open the BNV file again, Excel is crashing and so on.....

    If I Leave the file open which means the file is not closed by VBA, I stop my VBA applicatieon (a userform with functions) and I close the BNV.xls file manually then, I can open the file without any problem?????

    Does somebody have a idea what the problem can be? Should it have something todo with objects which are left behind in memory or...

    How can I delete in another way the excel sheets?

    Are there testtools that I can see that memory is still allocated etc.?
    Attached Images Attached Images

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1