Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Opening a saved file

Hi,

I am saving a file named abc.xls with the following code:

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:="abc", _
FileFormat:=xlNormal, Password:="",
WriteResPassword:="", ReadOnlyRecommended:=True,
CreateBackup:=False

Windows("abc.xls").Close

Problem : When I try to open this saved file I get the
following message:
"EXCEL.exe has generated errors and will be closed by
windows. You will need to restart the program.
An error log is being created."

Note: I don't get this message when I save manually the
same file.

Question 1: Any clue why I get this pop-up? and what is
the remedy?

Question 2: Where is this logfile in windows/office 2000?

Any help would be much appreciated


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a saved file

If you copied and pasted your code directly from your file, make sure
you add line continuation characters, or paste this in instead:

ActiveWorkbook.SaveAs Filename:="abc", _
FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=True, _
CreateBackup:=False

If you turn off the alerts you won't see any errors that happen while
this is running, so if the above code doesn't work, turn the alerts
back on and see what they say. Then, if you can't answer your own
question, post the alerts here so I can see them. - Pikus


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Opening a saved file


Thank you for your prompt reply,

I turned on the display alerts as you can see from the
code below. I didn't get any error message. The messages
were normal requests.

Still, the created file couldn't be opened, giving me the
same error message.
Note : The code below is copied and pasted from the Macro

Application.DisplayAlerts = True
ActiveWorkbook.SaveAs Filename:="abc", _
FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Windows("abcd.xls").Close




-----Original Message-----
If you copied and pasted your code directly from your

file, make sure
you add line continuation characters, or paste this in

instead:

ActiveWorkbook.SaveAs Filename:="abc", _
FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=True, _
CreateBackup:=False

If you turn off the alerts you won't see any errors that

happen while
this is running, so if the above code doesn't work, turn

the alerts
back on and see what they say. Then, if you can't answer

your own
question, post the alerts here so I can see them. - Pikus


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Opening a saved file


For a possible solution see Microsoft Knowledge Base
Article 199212.

I Had the same problem and this article resolved it.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a saved file

Well, unfortunately I don't have any new info for you, bu
the MS Knowledge Base idea sounds like a good one. Let me know ho
that turns out. - Piku

--
Message posted from http://www.ExcelForum.com

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
Macro saved .xls file is not opening in 2007 Vinod Excel Discussion (Misc queries) 2 July 8th 09 06:23 PM
Edits not saved when re-opening file SmartCookie Excel Worksheet Functions 1 January 2nd 09 07:16 PM
Excel file not opening when saved with Extention .html sfleck Excel Worksheet Functions 1 April 22nd 08 05:14 PM
Shared file not opening to a saved point Steve Excel Discussion (Misc queries) 2 October 4th 07 05:21 PM
Stop "Book1" from opening from a saved file jcutolo Excel Discussion (Misc queries) 4 July 27th 07 08:08 PM


All times are GMT +1. The time now is 01:48 AM.

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"