Saveas Error (attempt 2)

B

Barb Reinhardt

I have the following bit of code that normally works, but lately I'm getting
errors on the SaveAs line. It's completely kicking me out of excel.

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname 'Didn't have this line
originally and it worked
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close


Does anyone have any idea why I might be having these problems? Sometimes
it works and sometimes it doesn't.

Thanks,
Barb Reinhardt
 
B

Barb Reinhardt

It appears that copying worksheets from aWB to oWB caused this problem
somehow. WHen I moved them, I had no error. I believe the workbooks with
issues had links from one sheet to another.

Barb Reinhardt
 

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