The below code works great to capture the path and file name of a file and put it in the text box, however, it doesn't retain the data. When I return to the form, the path to the file is gone. What is the below missing in order to save the data in the text box?
Code:Private Sub Command12_Click() Dim dialog As FileDialog Set dialog = Application.FileDialog(msoFileDialogFilePicker) With dialog .AllowMultiSelect = False .Show Me.Text13 = .SelectedItems.Item(1) End With End Sub