View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 414
Default Macro to open SaveAs... and change filename to cell value

Thanks Julie

It did exactly what I wanted in terms of the file saving. Thankyou.
What it didn't do was also change the name of the .xlt I was working on. Yes, the file was saved as the correct name however as I would like to keep working on it without opening the correctname.xls.


"JulieD" wrote:

Hi Andy

something along the lines of

Dim fname As String
fname = "R:\" & Range("A1").Value & "\" & Range("A2").Value & ".xls"
ActiveWorkbook.SaveAs fname

this assumes that the folder for the company exists

Cheers
JulieD


"Andy" wrote in message
...
I have an excel.xlt file that I would like to fill in and save as an .xls

with its filename and path based on particular cell values

For example A1 = Company A2 = QuoteNumber

The full Path/filename I would like to SaveAs...
is R:\Company\QuoteNumber.xls

I would appreciate if any could suggest a macro code to do this:)