Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
cxlough41
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file nam


  #2   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file nam

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   Report Post  
Posted to microsoft.public.excel.misc
cxlough41
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file

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   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file

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   Report Post  
Posted to microsoft.public.excel.misc
cxlough41
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file

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   Report Post  
Posted to microsoft.public.excel.misc
cxlough41
 
Posts: n/a
Default how do i automaticly "save as" using a cell's content as file

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
I used "save as" but now can't locate original file Booksmarts Excel Discussion (Misc queries) 1 December 1st 05 08:15 PM
copying content of cell automatically to multiple cells PAUL GRAZIDE Excel Worksheet Functions 1 June 4th 05 06:52 PM
How do you copy a cell's content verses it's formula? Tammy Excel Discussion (Misc queries) 1 March 2nd 05 06:30 PM
Cannot drag content or formula to another cells Brian Excel Discussion (Misc queries) 2 February 14th 05 11:46 PM


All times are GMT +1. The time now is 01:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"