have a function that shows me the saving path choosen by user
The problem is I can't set filter to *accdb. If I work with msoFileDialogFilePicker then .filter property works. What should I do to set filter *accdb in msoFileDialogSaveAs?
The problem is I can't set filter to *accdb. If I work with msoFileDialogFilePicker then .filter property works. What should I do to set filter *accdb in msoFileDialogSaveAs?
Code:
Function Plik(TytulOkna As String, TytulPrzycisku As String, Filtr As String) As String
Dim wskazMiejsce As FileDialog
Set wskazMiejsce = Application.FileDialog(msoFileDialogSaveAs)
wskazMiejsce.Title = TytulOkna
wskazMiejsce.ButtonName = TytulPrzycisku
wskazMiejsce.AllowMultiSelect = False
wskazMiejsce.InitialFileName = "wniosek.accdb"
If wskazMiejsce.Show = -1 Then
WskazPlik = wskazMiejsce.SelectedItems(1)
MsgBox WskazPlik
End If
End Function