LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel VBA Program Won't Run After Auto-Save

I've been using VBA with Excel since 1995, and have been plagued with a
seemingly random error in every edition I've used. My programs always utilize
forms for entering, manipulating, and reporting data. The actual spreadsheets
are either hidden or minimized. On occasion, I would get the error:

The instruction at "0x00000000" referenced memory at "0x00000000". The
memory could not be "read".

When you step through the program, it works fine. Just when it runs
automatically did the error occur. The fix? I delete the last bit of code
entered; save; re-enter the code EXACTLY as it was before; save. The error
would disappear.

Now my current problem, again I am getting this mysterious error. When the
user closes the main form, the program protects all the worksheets, then
prompts the user to save the program. If you choose yes, it executes the
following lines of code to save the program then closes Excel.

Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True

When you reopen, it prompts to Enable Macros, but once enabled, it crashes.
To fix the error, I disable macros, save, and all is well.

Anybody have any ideas why this is happening, and better yet, how do i fix
it??
 
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 2007 auto-recovery / auto-save? gpurdue Setting up and Configuration of Excel 0 May 23rd 08 10:19 PM
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL T-mo Excel Discussion (Misc queries) 1 January 12th 06 10:16 PM
Auto Save Excel CLC 37 Qld Excel Discussion (Misc queries) 4 August 11th 05 12:43 PM
Auto Excel workbook close: save= false during an auto subroutine tomwashere2 Excel Programming 10 June 16th 05 06:23 AM
Auto Fill Program needed to get maps from internet onto excel Tricia[_2_] Excel Programming 1 July 8th 03 04:25 PM


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