Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Opening a file with macros lead Excel to crash

Hi,

From time to time when I open one file enabling the macros leads Excel to
crash and whether I save the file first disabling the macros the problem is
solved. Some other times excel doen's crash but it stop in one instruction
like
sheets("Setup").select this instruction is located in the workbook open
even and I think at that time Excel has not opened all the sheets and it's
not able to find it, but why it's only some times.

Any clue?, I appreciate any comment


--
Regards
Jorge Mendoza V
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Opening a file with macros lead Excel to crash

I think by the time the macro starts running, the complete file (with all its
worksheets) is open.

Any chance that the Setup sheet is hidden or even deleted, so that the .select
can't work?

And when you write crash, do you mean that the application crashes or that one
line causes an error.

If it's just the one line...

I've seen posts that say that excel can get "confused" while starting up. Some
pretty smart people have recommended this kind of thing.

Sub Auto_Open()
Application.OnTime Now, "Continue_Open"
End Sub

Then in a general module:

sub Continue_Open()
'your real code here
end sub

Maybe this'll avoid any "timing" issues that excel is having??????

Good luck.

If it's the application that's crashing, maybe it's time to recreate the
workbook. Maybe that workbook is corrupt and needs to be rebuilt.

Another option...

Maybe running Rob Bovey's code cleaner would help:
You can find it he
http://www.appspro.com/
or directly
http://www.appspro.com/Utilities/CodeCleaner.htm

JorgeLMV wrote:

Hi,

From time to time when I open one file enabling the macros leads Excel to
crash and whether I save the file first disabling the macros the problem is
solved. Some other times excel doen's crash but it stop in one instruction
like
sheets("Setup").select this instruction is located in the workbook open
even and I think at that time Excel has not opened all the sheets and it's
not able to find it, but why it's only some times.

Any clue?, I appreciate any comment

--
Regards
Jorge Mendoza V


--

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
Excel Outlook Attachments opening after several errors everytime cito_support Setting up and Configuration of Excel 2 March 13th 06 06:15 PM
how do I run excel 4.0 macros on excel 2000 RodolfoDallas Excel Discussion (Misc queries) 1 March 12th 06 03:14 AM
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Excel getting Error - file format is not valid WHEN OPENING babu Excel Discussion (Misc queries) 1 August 24th 05 09:09 PM


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

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

About Us

"It's about Microsoft Excel"