Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Workbook_Open CommandBar corrupt excel files

Hi,
I have 2 macros that create and delete a custom command bar at the opening
and before close.
A) When I save the file and then click on "X" without saving, I can reopen
the file.
B)But when I save the file, click on "X" and click on save, I can't reopen
the file (Excel ask to recover the file).
Does anyone have an idea?
Thank you!
Alex
Private Sub Workbook_Open()
Call CreateCommandBar
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call DeleteCommandBar
End Sub
--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Workbook_Open CommandBar corrupt excel files

I think it's coincidence.

Try creating a test workbook with the same routines and save that. I bet it
works ok.

I'm betting that your workbook is corrupted--or on the cusp of being corrupt.

Alex St-Pierre wrote:

Hi,
I have 2 macros that create and delete a custom command bar at the opening
and before close.
A) When I save the file and then click on "X" without saving, I can reopen
the file.
B)But when I save the file, click on "X" and click on save, I can't reopen
the file (Excel ask to recover the file).
Does anyone have an idea?
Thank you!
Alex
Private Sub Workbook_Open()
Call CreateCommandBar
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call DeleteCommandBar
End Sub
--
Alex St-Pierre


--

Dave Peterson
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
Corrupt Excel files when saving to Win2k3 server [email protected] Excel Programming 1 March 19th 08 02:18 PM
Programmatically determining corrupt excel files Greg Luce[_2_] Excel Discussion (Misc queries) 0 December 14th 07 06:19 PM
Keep saving corrupt Excel files Luke Chalmers Excel Discussion (Misc queries) 2 June 22nd 07 04:34 PM
corrupt Excel 2000/2002 files Ohio Doug Excel Discussion (Misc queries) 0 November 21st 05 03:35 PM
Excel 2000 - Files corrupt after saving via VBA Raymond Allan Excel Programming 1 September 22nd 04 03:19 PM


All times are GMT +1. The time now is 06:51 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"