ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stuck on SaveAs FileFormat in Excel 2007 VBA (https://www.excelbanter.com/excel-programming/427257-stuck-saveas-fileformat-excel-2007-vba.html)

Barb Reinhardt

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
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





Ron de Bruin

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel

What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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






Barb Reinhardt

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
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

"Ron de Bruin" wrote:

Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel

What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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







Ron de Bruin

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
Very strange

You can send me the xls private if you want so I can try it here for you

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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

"Ron de Bruin" wrote:

Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel

What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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








Barb Reinhardt

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
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.

"Ron de Bruin" wrote:

Very strange

You can send me the xls private if you want so I can try it here for you

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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

"Ron de Bruin" wrote:

Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel
What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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









Barb Reinhardt

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
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

"Ron de Bruin" wrote:

Very strange

You can send me the xls private if you want so I can try it here for you

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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

"Ron de Bruin" wrote:

Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel
What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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









Ron de Bruin

Stuck on SaveAs FileFormat in Excel 2007 VBA
 
You can try this first and test it again

Run Office Diagnostics.
Office ButtonExcel Options...Resources



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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

"Ron de Bruin" wrote:

Very strange

You can send me the xls private if you want so I can try it here for you

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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

"Ron de Bruin" wrote:

Hi Barb

This must work in 2007
ActiveWorkbook.SaveAs Filename:="myName.xls", FileFormat:=56
Do you have permission to save a file in that folder ?

keeps kicking me out of Excel
What do get ? Errors ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Barb Reinhardt" wrote in message
...
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











All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com