Thank you very much for your help.
I need to import a csv file into a table. I would like the use VBA to open a dialog box where the user can point to the selected file to import. The code below opens a dialog box and allows the user to select a file and it puts the file name in the text box. But it doesn't include the full path. I need the full path for my next section of code to import the file.
How can I get the path with the file name?
Dim objDialog As Object
Set objDialog = Application.FileDialog(3)
.AllowMultiSelect = False
If .SelectedItems.Count = 0 Then
MsgBox "No file selected."
Me.FileNameTextBox = Dir(.SelectedItems(1))
Set objDialog = Nothing