Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default 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
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
Save file as Cell Value Roger Excel Discussion (Misc queries) 2 January 28th 08 04:02 AM
Autoname a save as file from a cell in a read only file g4rod Excel Discussion (Misc queries) 2 October 6th 06 01:16 PM
Save file with cell name Brian Thompson via OfficeKB.com New Users to Excel 7 January 18th 06 09:11 PM
Save file as text from cell jweasl Excel Discussion (Misc queries) 1 September 9th 05 06:39 PM
Save a new file with the name that is in cell "C7" lunker55 Excel Discussion (Misc queries) 2 May 13th 05 04:57 PM


All times are GMT +1. The time now is 06:45 AM.

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"