Get Filename

A

Arnie

Morning All,
i am using this code to select a file but don't know how to pass the
filename and path
to a varriable?

Dim dlgOpen As Office.FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.Show
.AllowMultiSelect = False
.InitialFileName
End With

thanks in advance
 
A

Arnie

Sorry should be (no .InitialFilename)

Dim dlgOpen As Office.FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.Show
.AllowMultiSelect = False
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top