You need to use a variable:
Dim strFileName As String
strFileName = InputBox("Enter the full path and file name of your excel spreadsheet."

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tblExcel", strFileName, True
this code creates a variable called strFilename
It asks the user to enter a path and filename and stores the answer in the variable.
the transferspreadsheet method then uses what is stored in strFilename as an argument.
HTH
B ----------------------------------
Ben O'Hara
bo104@westyorkshire.pnn.police.uk
----------------------------------