Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm sure you'll need to use VBA for this. This will save the file with the
name based on the contents of A1. Sub AutoSaveName() ActiveWorkbook.SaveAs Range("A1").Value End Sub If you want to specify a save location: Sub AutoSaveName() ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub HTH, Paul "cxlough41" wrote in message ... |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
PC,
thanks.... but.... this does not seem to work am i supposed to do something first to make these codes work... i have tried a number of them and none seem to work. i am running xp with office pro 2003, i have never had a successfull outcome using vba/vbe. i think i must be doin some thing wrong or i am not set up to run these codes. HELP!...lol "PCLIVE" wrote: I'm sure you'll need to use VBA for this. This will save the file with the name based on the contents of A1. Sub AutoSaveName() ActiveWorkbook.SaveAs Range("A1").Value End Sub If you want to specify a save location: Sub AutoSaveName() ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub HTH, Paul "cxlough41" wrote in message ... |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
To open the VB Editor, press Alt and F11.
On the left side, right-click on 'Modules', select 'Insert', and click 'Module'. Paste the following code under Sub Macro1(). ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", _ FileFormat:=xlNormal, _ Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False Once this is done, close the MS Visual Basic Window. Then click Tools-Macro-Macros. Highlight 'Macro1" and then click 'Options...". Select a Shortcut key. This is the key press you will use to run the macro. Example. Ctrl+Y Once a shortcut key has been selected, click OK, then Cancel. Use your selected shortcut to activate the macro whenever needed. HTH, Paul "cxlough41" wrote in message ... PC, thanks.... but.... this does not seem to work am i supposed to do something first to make these codes work... i have tried a number of them and none seem to work. i am running xp with office pro 2003, i have never had a successfull outcome using vba/vbe. i think i must be doin some thing wrong or i am not set up to run these codes. HELP!...lol "PCLIVE" wrote: I'm sure you'll need to use VBA for this. This will save the file with the name based on the contents of A1. Sub AutoSaveName() ActiveWorkbook.SaveAs Range("A1").Value End Sub If you want to specify a save location: Sub AutoSaveName() ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub HTH, Paul "cxlough41" wrote in message ... |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
this is crazy... ok this is what i get...
first... alt+F11 brings up a chart worksheet which can't be right....i think... so what i did was right clicked on the excel icon to the left of the file button... click "view code" and VBA editor opens... then on the left side, right-click on 'Modules', select 'Insert', and click 'Module' (there is a list of all worksheets in the workbook under "microsoft excel objects" folder... and there is an icon for the "workbook module" at the bottom). it seems each sheet has a module. when i created the new as instructed it is named "Module1" under the modules folder. i assume that this "Modules" folder and the smaller window named "module 1 (code)" is where the code you gave me goes. i pasted the code here and followed the rest of your instruction. when i get to the "Tools \ Macro \ Macros \ the macros window is completely empty and i can not chose options as it is geyed out as an available click. therefore i can not go any further. do i need to set up macros first or should everything up to now make it work? i am so lost... thanks for your help. the following is not there. *Paste the following code under Sub Macro1().* what i get is * "PCLIVE" wrote: To open the VB Editor, press Alt and F11. On the left side, right-click on 'Modules', select 'Insert', and click 'Module'. Paste the following code under Sub Macro1(). ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", _ FileFormat:=xlNormal, _ Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False Once this is done, close the MS Visual Basic Window. Then click Tools-Macro-Macros. Highlight 'Macro1" and then click 'Options...". Select a Shortcut key. This is the key press you will use to run the macro. Example. Ctrl+Y Once a shortcut key has been selected, click OK, then Cancel. Use your selected shortcut to activate the macro whenever needed. HTH, Paul "cxlough41" wrote in message ... PC, thanks.... but.... this does not seem to work am i supposed to do something first to make these codes work... i have tried a number of them and none seem to work. i am running xp with office pro 2003, i have never had a successfull outcome using vba/vbe. i think i must be doin some thing wrong or i am not set up to run these codes. HELP!...lol "PCLIVE" wrote: I'm sure you'll need to use VBA for this. This will save the file with the name based on the contents of A1. Sub AutoSaveName() ActiveWorkbook.SaveAs Range("A1").Value End Sub If you want to specify a save location: Sub AutoSaveName() ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub HTH, Paul "cxlough41" wrote in message ... |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
PC,
i got it! just one more question though... what is the difference between the two codes you gave me. it looks like one is for a manual and the other is for the auto. I got the manual to work but i did not get the auto to work. i guess i can play with it while the manual will do for now. please let me know if you think of anything that might help me get the auto to run by its self. thank you for your kind help. "PCLIVE" wrote: To open the VB Editor, press Alt and F11. On the left side, right-click on 'Modules', select 'Insert', and click 'Module'. Paste the following code under Sub Macro1(). ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", _ FileFormat:=xlNormal, _ Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False Once this is done, close the MS Visual Basic Window. Then click Tools-Macro-Macros. Highlight 'Macro1" and then click 'Options...". Select a Shortcut key. This is the key press you will use to run the macro. Example. Ctrl+Y Once a shortcut key has been selected, click OK, then Cancel. Use your selected shortcut to activate the macro whenever needed. HTH, Paul "cxlough41" wrote in message ... PC, thanks.... but.... this does not seem to work am i supposed to do something first to make these codes work... i have tried a number of them and none seem to work. i am running xp with office pro 2003, i have never had a successfull outcome using vba/vbe. i think i must be doin some thing wrong or i am not set up to run these codes. HELP!...lol "PCLIVE" wrote: I'm sure you'll need to use VBA for this. This will save the file with the name based on the contents of A1. Sub AutoSaveName() ActiveWorkbook.SaveAs Range("A1").Value End Sub If you want to specify a save location: Sub AutoSaveName() ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Range("A1").Value & ".xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False End Sub HTH, Paul "cxlough41" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
I used "save as" but now can't locate original file | Excel Discussion (Misc queries) | |||
copying content of cell automatically to multiple cells | Excel Worksheet Functions | |||
How do you copy a cell's content verses it's formula? | Excel Discussion (Misc queries) | |||
Cannot drag content or formula to another cells | Excel Discussion (Misc queries) |