Save failing

J

Jennifer

I'm converting a workbook to 2007 from 2003. Luckily all the code
seems to work except for saving the file. From looking through the
help files it seems that the ActiveWorkbook.Save command should be
just fine. I'm not sure what else to try. The error message is : "Run-
time error '1004': Method 'Save' of object '_Workbook' failed".

Suggestions please? Code below.

Private Sub CommandButton1_Click()
ActiveSheet.Unprotect
Sheet1.ClearTotals
Call Sheet1.ClearOrder
Worksheets("Order Form").Activate
ActiveSheet.Protect
ActiveWorkbook.Save
Application.DisplayAlerts = False
Application.Quit
End Sub
 
K

ker_01

Activeworkbook.save is correct for XL2003.

Is this workbook being opened from an email attachment, a local drive, or a
network drive?

Is the file marked or opened as read-only?

What happens when you try to save the file normally (without using a macro)-
does Excel pop up any dialogue boxes of any kind? If your macro opens the
file, put a breakpoint in and then try to save the file manually just to make
sure the rest of the scenario is identical.

What is the file extension of the file? (XLS, XLSX, XLSM, etc)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top