Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
I want to set up a Save As macro button to to save a file as "cell
value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
Sub Macro1()
v = Range("A1").Value & Range("A2").Value ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & "\" & v End Sub -- Gary''s Student - gsnu200820 "Tony. D" wrote: I want to set up a Save As macro button to to save a file as "cell value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
Sub Macro8()
v1 = Range("a1") v2 = Range("a2") ActiveWorkbook.SaveAs Filename:="C:\yourfolder\" & v1 & v2 & ".xls" End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Tony. D" <Tony. wrote in message ... I want to set up a Save As macro button to to save a file as "cell value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
When I copy the text inot my macro button as :
Private Sub CommandButton2_Click() v = Range("A1").Value & Range("A2").Value ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & "\" & v End Sub I get a runtime error 1004 "Tony. D" wrote: I want to set up a Save As macro button to to save a file as "cell value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
Tony. D wrote:
I want to set up a Save As macro button to to save a file as "cell value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? Create a "Blank" excel workbook with the following macro. This way the "Blank" workbook will always be blank and ready to create a new Filled in version. The Path will need to be change to meet your needs. You could get sophisticated and work out how to get it to "Ask You Where you want it to go". Global strPath As String Sub NameFile() strPath = "I:\Database Development Files\BorderManager Filters" ActiveWorkbook.SaveAs Filename:=strPath & "\" & Range("A1").Value & " " & Range("A2").Value, _ FileFormat:=xlExcel8, CreateBackup:=False Application.DisplayAlerts = True ActiveWorkbook.Save End Sub -- |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
What's the activeworkbook's path?
And you've double checked the values in A1 and A2, right? Tony. D wrote: When I copy the text inot my macro button as : Private Sub CommandButton2_Click() v = Range("A1").Value & Range("A2").Value ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & "\" & v End Sub I get a runtime error 1004 "Tony. D" wrote: I want to set up a Save As macro button to to save a file as "cell value".xls. It should have the File Save As box appear with the follwing: i.e. Cell A1 - MortgageNo Cell A2 - 12345678 filename = MortgageNo12345678.xls Can anyone help me out? -- Dave Peterson |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
File save as cell value
Some one posted this code and thought I'd incorporate it with the code
I gave you. Sub NameFile() Dim strngpth As String strngpth = Application.InputBox("Enter the Desired Save path", , , , , , , 2) Set strng1 = Application.InputBox(prompt:="Enter the Desired First Cell", Type:=8) Set strng2 = Application.InputBox(prompt:="Enter the Desired Second Cell", Type:=8) strPath = "I:\Database Development Files\BorderManager Filters\" ActiveWorkbook.SaveAs Filename:=strngpth & strng1.Value & " " & strng2.Value, FileFormat:=xlExcel8, CreateBackup:=False Application.DisplayAlerts = True ActiveWorkbook.Save End Sub -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save file as Cell Value | Excel Discussion (Misc queries) | |||
Autoname a save as file from a cell in a read only file | Excel Discussion (Misc queries) | |||
Save file with cell name | New Users to Excel | |||
Save file as text from cell | Excel Discussion (Misc queries) | |||
Save a new file with the name that is in cell "C7" | Excel Discussion (Misc queries) |