Saveas error
I have the following bit of code
aWBname = aWB.Name aWBname = oWB.Path & "\" & aWBname Application.DisplayAlerts = False aWB.Close savechanges:=False oWB.SaveAs Filename:=aWBname Application.DisplayAlerts = True oWB.Close -- HTH, Barb Reinhardt |
Saveas error
You're not really trying to save it after you have closed it are you? I
think that if you do the SaveAs first and then close it, it will work. "Barb Reinhardt" wrote: I have the following bit of code aWBname = aWB.Name aWBname = oWB.Path & "\" & aWBname Application.DisplayAlerts = False aWB.Close savechanges:=False oWB.SaveAs Filename:=aWBname Application.DisplayAlerts = True oWB.Close -- HTH, Barb Reinhardt |
Saveas error
No it won't, I took a closer look. The code is a little confusing. Do you
have two workbooks open, oWB and aWB? Or are you trying to save a revised workbook to replace the old workbook? The latter looks more like what you are trying. "Barb Reinhardt" wrote: I have the following bit of code aWBname = aWB.Name aWBname = oWB.Path & "\" & aWBname Application.DisplayAlerts = False aWB.Close savechanges:=False oWB.SaveAs Filename:=aWBname Application.DisplayAlerts = True oWB.Close -- HTH, Barb Reinhardt |
All times are GMT +1. The time now is 06:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com