BMIT
asked on
MS Excel SaveAs Without Prompt, VBA MS Access
Hello,
I have the following code at the end of a function that edits an Excel spreadsheet within an Access code, VBA:
apExcel.DisplayAlerts = False
wkBook.SaveAs FileName:=sFileName
apExcel.DisplayAlerts = True
Supposedly, this should save the file without any prompts. Strangely, it seems to save the file, the prompt again if I want to save the prompt. I recently upgraded from Access and Excel 2000 to 2010, and this code worked fine with those. However, everything I read says this should work.
Anyone have any ideas?
Thanks,
I have the following code at the end of a function that edits an Excel spreadsheet within an Access code, VBA:
apExcel.DisplayAlerts = False
wkBook.SaveAs FileName:=sFileName
apExcel.DisplayAlerts = True
Supposedly, this should save the file without any prompts. Strangely, it seems to save the file, the prompt again if I want to save the prompt. I recently upgraded from Access and Excel 2000 to 2010, and this code worked fine with those. However, everything I read says this should work.
Anyone have any ideas?
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wkBook.Close SaveChanges:=False"
You hit the nail on the head. This fixed the issue.
Thanks.