Saveas error

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
 
J

JLGWhiz

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.
 
J

JLGWhiz

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.
 

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