Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Error
Hello,
I am getting the following error when trying to save a file as a CSV file: run-time error '1004': Method 'SaveAs" of object'_Workbook' failed I found the following workaround (see below), but I am building this application for other people and this solution is not an option. Any help with this would be appreciated. -- Thanks in advance, Steven http://www.kbalertz.com/kb_Q199268.aspx To work around this problem, unlock the workbook before running the macro. To do this, follow these steps: Open the workbook that you are trying to save as text. Press ALT+F11 to open the Visual Basic Editor. On the Tools menu, click VBAProject Properties, and then click the Protection tab. Click to clear the Lock project for viewing check box. Click OK. On the File menu, click Save. Press ALT+Q to return to Excel. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Error
Activesheet.copy
Application.DisplayAlerts = False Activeworkbook.Saveas "C:\MyFile.csv" Application.DisplayAlerts = True ActiveWorkbook.Close Savechanges:=False -- Regards, Tom Ogilvy "Steven K" wrote in message ... Hello, I am getting the following error when trying to save a file as a CSV file: run-time error '1004': Method 'SaveAs" of object'_Workbook' failed I found the following workaround (see below), but I am building this application for other people and this solution is not an option. Any help with this would be appreciated. -- Thanks in advance, Steven http://www.kbalertz.com/kb_Q199268.aspx To work around this problem, unlock the workbook before running the macro. To do this, follow these steps: Open the workbook that you are trying to save as text. Press ALT+F11 to open the Visual Basic Editor. On the Tools menu, click VBAProject Properties, and then click the Protection tab. Click to clear the Lock project for viewing check box. Click OK. On the File menu, click Save. Press ALT+Q to return to Excel. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SaveAs method error | Excel Discussion (Misc queries) | |||
error message with saveas | Excel Discussion (Misc queries) | |||
Error on ActiveWorkbook.SaveAs method | Excel Programming | |||
Error on ActiveWorkbook.SaveAs method | Excel Programming | |||
Error on SaveAs Macro | Excel Programming |