Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro saved .xls file is not opening in 2007 | Excel Discussion (Misc queries) | |||
Edits not saved when re-opening file | Excel Worksheet Functions | |||
Excel file not opening when saved with Extention .html | Excel Worksheet Functions | |||
Shared file not opening to a saved point | Excel Discussion (Misc queries) | |||
Stop "Book1" from opening from a saved file | Excel Discussion (Misc queries) |