Stuck on SaveAs FileFormat in Excel 2007 VBA

B

Barb Reinhardt

I have the following line of code that just keeps kicking me out of Excel.

oWB.SaveAs Filename:=aWBName, FileFormat:=FileFormatNum

In this case,

aWBName = "myName.xls"
FileFormatNum = 56

What am I missing?

I'm saving the workbook to ths same folder as the original oWB so am not
including the path.

Thanks,
Barb Reinhardt
 
B

Barb Reinhardt

It's a folder on my C drive and I'm seeing some temp files there, but nothing
else. Also, no errors. It's just closing Excel. The workbook with the
code is also an .xls.

Strange, huh?

Barb
 
B

Barb Reinhardt

I stopped execution immediately before the saveas and then saved the file
manually and had the same problem. I think the code is the least of my
problems at this point.

I'll let you know what I come up with.
 
B

Barb Reinhardt

We're in the thick of an Office 2007 rollout and things have been changing.
When I changed my code to save the file as a .xlsx with the correct
fileformat, it worked fine. Any idea what might have changed that would
cause this problem.

Thanks,
Barb
 

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