Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with a name generated by cell values

Hi,

I'm building a database of customer enquiries. The macro i have writte
extracts data from the user input cells and places them in a hidde
sheet ready for submission to a central database via the templat
wizard.

What I'd like to do is, rather than having users on the network savin
the file as random names, to have some control over the naming proces
so that the customer's name and the date is picked up and turned int
the file name.

I've got as far as choosing the filename with this formula:-

=CONCATENATE(Customer,"_",Date,".xls")

which gives me the name. I also will have a standard path that thi
tags on to on the network.

Please can you tell me how to save the file based on this cell'
value?

Thanks

Analys

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Saving a file with a name generated by cell values

sPath = "C:\Myfiles\"

thisworkbook.SaveAs sPath & _
thisworkbook.worksheets("Sheet3").Range("A1").Valu e

--
Regards,
Tom Ogilvy


"analyst " wrote in message
...
Hi,

I'm building a database of customer enquiries. The macro i have written
extracts data from the user input cells and places them in a hidden
sheet ready for submission to a central database via the template
wizard.

What I'd like to do is, rather than having users on the network saving
the file as random names, to have some control over the naming process
so that the customer's name and the date is picked up and turned into
the file name.

I've got as far as choosing the filename with this formula:-

=CONCATENATE(Customer,"_",Date,".xls")

which gives me the name. I also will have a standard path that this
tags on to on the network.

Please can you tell me how to save the file based on this cell's
value?

Thanks

Analyst


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Saving a file with a name generated by cell values

hi,
tested
Sub Macro3()
Dim doda As Range
Set doda = Range("E6")
Range("E6").FormulaR1C1 = "test_Delete_later"
Workbooks.Add
ActiveWorkbook.SaveAs Filename:="H:\CodeStuff\" & _
doda & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

-----Original Message-----
Hi,

I'm building a database of customer enquiries. The macro

i have written
extracts data from the user input cells and places them

in a hidden
sheet ready for submission to a central database via the

template
wizard.

What I'd like to do is, rather than having users on the

network saving
the file as random names, to have some control over the

naming process
so that the customer's name and the date is picked up and

turned into
the file name.

I've got as far as choosing the filename with this

formula:-

=CONCATENATE(Customer,"_",Date,".xls")

which gives me the name. I also will have a standard path

that this
tags on to on the network.

Please can you tell me how to save the file based on this

cell's
value?

Thanks

Analyst


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with a name generated by cell values

I was looking for the exact same info today as well.

Works perfectly.

Thank

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with a name generated by cell values

Thanks - that works great

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file with a name generated by cell values

Just one more thing - is there a line of code which can be inserted int
that macro that will prompt the template to send the data to th
database or update the existing record

--
Message posted from http://www.ExcelForum.com

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
Obtaining the minimum of values which have been generated by a for Caithness Girl New Users to Excel 6 November 18th 09 05:01 PM
Sorting values generated by a formula... Randy L Excel Discussion (Misc queries) 1 August 17th 07 04:00 PM
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
accumulating values generated daily Tracey Excel Worksheet Functions 1 April 15th 06 08:07 AM
Saving a file(new) using the multiple cell contents as a file name Dave Peterson[_3_] Excel Programming 1 August 1st 03 01:40 PM


All times are GMT +1. The time now is 04:20 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"