Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs needed if new
Wes,
You can use the Path property to determine whether a workbook has ever been saved. If this property returns an empty string, you are working with a new, unsaved workbook. E.g., If ActiveWorkbook.Path = "" Then ' new, unsaved workbook Else ' existing workbook End If You can use the Saved property to determine whether a workbook is in a saved state, i.e., no save is required. E.g., If ActiveWorkbook.Saved = True Then ' no save required Else ' save required. End If You can use the Application.GetSaveAsFilename to display the Save As dialog. This method will return the file name chosen by the user. Note the GetSaveAsFilename does not actually save the file; it merely returns a filename. E.g., Dim FName As Variant FName = Application.GetSaveAsFilename() If FName = False Then ' user cancelled Else MsgBox "File name: " & FName End If Combining the above procedures should give you the functionality you need. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Wes Jester" wrote in message ... Is there a method to invoke something similar to the "standard" save. My users can open an exisitng spreadsheet or a new S/S using a template. As part of the app, I need to determine if the sheet they are working on has already been saved. If so, I can simply issue a object.Save. Otherwise, I would like the app to mimic the Save action that happens when you save a workbook the first time. Essentially, I want to do exactly what EXCEL does when one tries to do a Save the first time. I just don't know how to do it in code. Any help is appreciated. Wes *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using SaveAs | Excel Discussion (Misc queries) | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
VBA SaveAs Value | Excel Discussion (Misc queries) | |||
SaveAs | Excel Worksheet Functions |