M
Mike Comtois
I'm fairly new to modules and functions and was wondering
if anyone could help with this:
I want to have a function where all I have to do is call it
and have the tablename and path as the variables. This is
what I have but I am unsure of how to implement it or if it
should even work:
Public Function Import_XLS(strFileName As String,
strTableName As String)
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=acspreadsheetTypeExcel17, _
tablename:=strTableName, _
filename:="T:\Excel_Files\" & strFileName, _
hasfieldnames:=True
End Function
Can someone help please?? I'm using Access 2002
if anyone could help with this:
I want to have a function where all I have to do is call it
and have the tablename and path as the variables. This is
what I have but I am unsure of how to implement it or if it
should even work:
Public Function Import_XLS(strFileName As String,
strTableName As String)
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=acspreadsheetTypeExcel17, _
tablename:=strTableName, _
filename:="T:\Excel_Files\" & strFileName, _
hasfieldnames:=True
End Function
Can someone help please?? I'm using Access 2002