Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nkamp
 
Posts: n/a
Default 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.


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


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:

Workbooks("BNV.xls").Close savechanges:=TRUE

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


+-------------------------------------------------------------------+
|Filename: vba error.gif |
|Download: http://www.excelforum.com/attachment.php?postid=3427 |
+-------------------------------------------------------------------+

--
nkamp
------------------------------------------------------------------------
nkamp's Profile: http://www.excelforum.com/member.php...o&userid=23760
View this thread: http://www.excelforum.com/showthread...hreadid=374138

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Corrupt File / Urgent cpayne1757 Excel Discussion (Misc queries) 7 March 6th 07 04:20 AM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM
Excell 2000 - Cannot open file RustyC Excel Discussion (Misc queries) 2 March 4th 05 09:55 PM
Reflect file path (show drive letters) in Excel 2000 Alicia Excel Discussion (Misc queries) 4 January 20th 05 07:49 PM
Excel 2000 file when opened in Excel 2003 generates errors? Doug Excel Discussion (Misc queries) 13 December 25th 04 11:20 PM


All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"