Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save as Macro in excel - Help needed!!
Hi,
I have a macro with these lines in it: FName = Cells(2, 2).Value ActiveWorkbook.SaveAs Filename:=FName This works fine and saves the file as the value in the cell - however I want to be able to call the file by the value in three cells and also add some text, so the file name would look like: "Reference (Cells (2,2).Value) Region (Cells (4,2).Value) Day (Cells (5,2).value)" Can anyone help?????? -- Cillian |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save as Macro in excel - Help needed!!
dim myFileName as string
with worksheets("Sheet99") myfilename = .cells(2,2).value & " Region " & .cells(4,2).value _ & " Day " & .cells(5,2).value end with Remember that if any of those cells contain a date, you may have to format the value to use it as a file name: .... & " Day " & format(.cells(5,2).value,"yyyymmdd") Cillian wrote: Hi, I have a macro with these lines in it: FName = Cells(2, 2).Value ActiveWorkbook.SaveAs Filename:=FName This works fine and saves the file as the value in the cell - however I want to be able to call the file by the value in three cells and also add some text, so the file name would look like: "Reference (Cells (2,2).Value) Region (Cells (4,2).Value) Day (Cells (5,2).value)" Can anyone help?????? -- Cillian -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro save a workbook whilst increasing file no | Excel Worksheet Functions | |||
Excel 2000 cannot save and create temp file | Setting up and Configuration of Excel | |||
Macro excel save | Excel Discussion (Misc queries) | |||
Save & Save As features in file menu of Excel | Excel Discussion (Misc queries) | |||
Macro in Excel 2002 to save a workbook to a FTP location | Excel Discussion (Misc queries) |