Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to save excel gives msg about RESUME.XLS

Status
Not open for further replies.
Dec 23, 2004
33
US
Hi,

"A file named RESUME.XLW already exists, do you want to replace it?"

Is there a way to stop the above message appearing even though I have the codes "DoCmd.SetWarnings False" and "Application.DisplayAlerts = wdAlertsNone
" in my macro?

Thanks.
 
DoCmd.SetWarnings False is Access VBA
Application.DisplayAlerts = wdAlertsNone is Word VBA
RESUME.XLW is an Excel workspace
So, like Frederico stated, you have to elaborate a lot ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I have a button named "Update_Excel" in access. The button is set On Click called [Event Procedure]. For testing purposes, I left out all the functions. It still gives me the RESUME.xlw warning message. Thanks.

Here is my codes:
-------------------------------

Private Sub Update_Excel_click()

Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook

DoCmd.SetWarnings False

sourcefilepath = "C:\MyFolder\Book1.xls"

Set objWorkbook = objExcel.Application.Workbooks.Open(FileName:=sourcefilepath)

objExcel.Save
objWorkbook.Close
objExcel.Quit

Set objWorkbook = Nothing
Set objExcel = Nothing

End Sub
 
Replace this:
objExcel.Save
By this:
objExcel.ActiveWorkbook.Save

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for your quick response.

I replaced objExcel.Save with objWorkbook.Save. It also works. Is it the same thing as objExcel.ActiveWorkbook.Save?


 
In your case, yes.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top