Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a startup macro on one of my worksheets. It has the user input a
batch number into cell a1, and then it saves the file as the batch number. The batch number is something like 01.ABC.255. When I try to run the macro listed below, the file saves as a .255 file instead of a .xls file. ActiveWorkbook.SaveAs Filename:=ActiveCell.Value I've tried to add text and file extensions after the "value", but cant get it to work. Ideally I would like the user to type in 01.ABC.255 and have the file saved as 01.ABC.255.area1.xls Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I knew that .xls wasn't part of the value, I'd use:
ActiveWorkbook.SaveAs Filename:=ActiveCell.Value & ".xls", _ fileformat:=xlworkbooknormal charlie wrote: I have a startup macro on one of my worksheets. It has the user input a batch number into cell a1, and then it saves the file as the batch number. The batch number is something like 01.ABC.255. When I try to run the macro listed below, the file saves as a .255 file instead of a .xls file. ActiveWorkbook.SaveAs Filename:=ActiveCell.Value I've tried to add text and file extensions after the "value", but cant get it to work. Ideally I would like the user to type in 01.ABC.255 and have the file saved as 01.ABC.255.area1.xls Thanks -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That does it. Thanks for your help.
"Dave Peterson" wrote: If I knew that .xls wasn't part of the value, I'd use: ActiveWorkbook.SaveAs Filename:=ActiveCell.Value & ".xls", _ fileformat:=xlworkbooknormal charlie wrote: I have a startup macro on one of my worksheets. It has the user input a batch number into cell a1, and then it saves the file as the batch number. The batch number is something like 01.ABC.255. When I try to run the macro listed below, the file saves as a .255 file instead of a .xls file. ActiveWorkbook.SaveAs Filename:=ActiveCell.Value I've tried to add text and file extensions after the "value", but cant get it to work. Ideally I would like the user to type in 01.ABC.255 and have the file saved as 01.ABC.255.area1.xls Thanks -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Also, can I specify where it saves to?
"charlie" wrote: I have a startup macro on one of my worksheets. It has the user input a batch number into cell a1, and then it saves the file as the batch number. The batch number is something like 01.ABC.255. When I try to run the macro listed below, the file saves as a .255 file instead of a .xls file. ActiveWorkbook.SaveAs Filename:=ActiveCell.Value I've tried to add text and file extensions after the "value", but cant get it to work. Ideally I would like the user to type in 01.ABC.255 and have the file saved as 01.ABC.255.area1.xls Thanks |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In your code?
ActiveWorkbook.SaveAs Filename:="C:\my documents\excel\" & _ ActiveCell.Value & ".xls", fileformat:=xlworkbooknormal charlie wrote: Also, can I specify where it saves to? "charlie" wrote: I have a startup macro on one of my worksheets. It has the user input a batch number into cell a1, and then it saves the file as the batch number. The batch number is something like 01.ABC.255. When I try to run the macro listed below, the file saves as a .255 file instead of a .xls file. ActiveWorkbook.SaveAs Filename:=ActiveCell.Value I've tried to add text and file extensions after the "value", but cant get it to work. Ideally I would like the user to type in 01.ABC.255 and have the file saved as 01.ABC.255.area1.xls Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs | Excel Worksheet Functions | |||
SAveAs worksheet | Excel Worksheet Functions | |||
saveas CSV file | Excel Discussion (Misc queries) | |||
Saveas Macro | Excel Discussion (Misc queries) | |||
Q: overwrite during saveas | Excel Discussion (Misc queries) |