We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub cmdSave_Click() Dim sFilePathAndName as String On Error Goto cmdSave_Exit With dlgFolder .CancelError = True .DefaultExt = ".txt" .Filter = "Text File (*.txt)|*.txt" .DialogTitle = "Save As" .flags = cdlOFNExplorer + cdlOFNNoReadOnlyReturn + cdlOFNOverwritePrompt _ + cdlOFNPathMustExist .ShowSave sFilePathAndName = .FileName End With ' trivial case to show problem ' just exit the form and leave the application running, ' then try to eject the removable media Debug.Print sFilePathAndName cmdSave_Exit: Unload Me End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.