In MSAccess I\'ve a mask with a button. When the user clicks on the button, the data in a table are exported on a .txt file:
Private Sub Command_Click()
Dim
You can set a reference to the Microsoft Office x.x Object Library and use FileDialog.
FileDialog Properties
Sub ShowFileDialog()
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogSaveAs)
With dlgOpen
.InitialFileName = "Z:\docs\"
.Show
End With
End Sub
Also: How do I get a single file name out of a File Dialog object in VBA (for MS Access 2007)?
For an API solution see here : http://access.mvps.org/access/api/api0001.htm
Works well for me. Simply copy and paste in a new module.