The FileDialog(msoFileDialogSaveAs) method doesn't save anything, it's just a window in which the user can
- select a folder
- type a file name
- choose a file extension
If I want to use the User's choice then I have to manually handle every combination of extensions... because if User selects pdf or txt file --> those have to be handled differently. (macro recorder records completely other code for exporting as pdf or as txt)
So I don't know what's the point of FileDialog(msoFileDialogSaveAs).
If I want to export the file in a specific format then I will maybe make the user to choose a folder and file name but not extension. (since then i have to handle 50 situations)
So I really don't get the use of FileDialog(msoFileDialogSaveAs) method. Why or when is this useful? Thank you very much for your idea.
_________________________________
Sub Save()
Dim x As Integer
dim Path As String
x = Application.FileDialog(msoFileDialogSaveAs).Show
If x> 0 Then
Path = Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1)
MsgBox Path
End If
End Sub
- select a folder
- type a file name
- choose a file extension
If I want to use the User's choice then I have to manually handle every combination of extensions... because if User selects pdf or txt file --> those have to be handled differently. (macro recorder records completely other code for exporting as pdf or as txt)
So I don't know what's the point of FileDialog(msoFileDialogSaveAs).
If I want to export the file in a specific format then I will maybe make the user to choose a folder and file name but not extension. (since then i have to handle 50 situations)
So I really don't get the use of FileDialog(msoFileDialogSaveAs) method. Why or when is this useful? Thank you very much for your idea.
_________________________________
Sub Save()
Dim x As Integer
dim Path As String
x = Application.FileDialog(msoFileDialogSaveAs).Show
If x> 0 Then
Path = Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1)
MsgBox Path
End If
End Sub