Saveas error

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

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
 
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.
 
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.
 
Back
Top