Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Please can someone tell me the VBA code to prompt a user to 'save as' a file in excel. the folders will have to be specified... -- Thanks Sally |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Look at GetSaveAsFilename in VBA help.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Sally" wrote in message ... Hi, Please can someone tell me the VBA code to prompt a user to 'save as' a file in excel. the folders will have to be specified... -- Thanks Sally |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Something similar to this should work
Sub FileSaveAsCode() Dim fName As Variant fName = Application.GetSaveAsFilename( _ fileFilter:="Excel Workbooks (*.xls), *.xls") If fName = "" Then ' user [Cancel]ed Exit Sub End If On Error Resume Next ActiveWorkbook.SaveAs Filename:=fName If Err < 0 Then 'user probably cancelled at this point 'as when notified of existing file of same name 'you can either test for errors 'or simply ignore them Err.Clear End If On Error GoTo 0 ' clear error trapping End Sub "Sally" wrote: Hi, Please can someone tell me the VBA code to prompt a user to 'save as' a file in excel. the folders will have to be specified... -- Thanks Sally |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try code like
Dim FName As Variant FName = Application.GetSaveAsFilename(ThisWorkbook.Name, "Excel Files (*.xls),*.xls") If FName = False Then MsgBox "User Clicked Cancel" Else ThisWorkbook.SaveAs Filename:=FName End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Sally" wrote in message ... Hi, Please can someone tell me the VBA code to prompt a user to 'save as' a file in excel. the folders will have to be specified... -- Thanks Sally |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Save File (Unique file name) | Excel Worksheet Functions | |||
Excel XP: File name in Title Bar not changed after Save As... | Excel Discussion (Misc queries) | |||
save excel file from a table delimited file (.txt) using macros | New Users to Excel | |||
How do you disable save file dialog? | Setting up and Configuration of Excel | |||
Weekly Transaction Processing | Excel Worksheet Functions |