Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
writing a macro to save a workbook
I have a workbook with a macro that save the workbook, however i want the
macro to save it as the same file name as data that was entered into a certain cell or cells pural if able to |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
writing a macro to save a workbook
Hi Brian,
Something like this:- Sub Create_File_Save() Dim strPath As String Dim strMyFileName As String strPath = CurDir & "\" 'Ensure backslash on end of path 'Code uses Current Directory as path. 'Can create path as follows:- 'strPath = "C:\Documents\MyName\" With Sheets("Sheet1") 'Insert more ambersands and ranges if required strMyFileName = .Range("A1") & .Range("B1") & ".xls" 'If spaces required in filename the use this option 'strMyFileName = .Range("A1") & " " & .Range("B1") & ".xls" End With strMyFileName = strPath & strMyFileName ActiveWorkbook.SaveAs Filename:=strMyFileName End Sub -- Regards, OssieMac "Brian" wrote: I have a workbook with a macro that save the workbook, however i want the macro to save it as the same file name as data that was entered into a certain cell or cells pural if able to |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
writing a macro to save a workbook
Check your other post, too.
Brian wrote: I have a workbook with a macro that save the workbook, however i want the macro to save it as the same file name as data that was entered into a certain cell or cells pural if able to -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to save excel sheet in a workbook | Excel Discussion (Misc queries) | |||
save workbook as current date using a macro | Excel Discussion (Misc queries) | |||
Run Macro(save workbook) after cell updated | New Users to Excel | |||
Macro: Exit active workbook without save? | Excel Worksheet Functions | |||
Macro in Excel 2002 to save a workbook to a FTP location | Excel Discussion (Misc queries) |