AccessBEginner
Programmer
I am using the following code to import a spreadsheet into an Access table:
Sub FileName()
Dim strInput As String, strMsg As String
strMsg = "Enter the path and input filename."
strInput = InputBox(Prompt:=strMsg, Title:="Input File", XPos:=2000, YPos:=2000)
DoCmd.TransferSpreadsheet acImport, 8, "T_RES_IMPORT", strInput, True
End Sub
Is there a way I can include a Browse button on the message box, so that the file name can be browsed to , instead of typing the complete path and name.
Thanks.
Sub FileName()
Dim strInput As String, strMsg As String
strMsg = "Enter the path and input filename."
strInput = InputBox(Prompt:=strMsg, Title:="Input File", XPos:=2000, YPos:=2000)
DoCmd.TransferSpreadsheet acImport, 8, "T_RES_IMPORT", strInput, True
End Sub
Is there a way I can include a Browse button on the message box, so that the file name can be browsed to , instead of typing the complete path and name.
Thanks.