G
Guest
Hi, please help...
I am trying to import data from a series of ranges on a worksheet and import
to tables in my database. This code below will import the whole worksheet
into a table but thats not any good, I need to import a range (I have named
them in excel)
How can I do this?
Private Sub cmdImport_Click()
strPath = "\\titan\home\jeremyl1\"
strFileName = Dir(strPath & "5HG_Feb_Comm.xls")
MsgBox "Data Loading...", vbInformation, "Jez"
If Len(strFileName) <> 0 Then
DoCmd.TransferSpreadsheet acImport, , strTempTable, strPath &
strFileName, True
End If
MsgBox "Import Complete", vbInformation, "Jez"
End Sub
I am trying to import data from a series of ranges on a worksheet and import
to tables in my database. This code below will import the whole worksheet
into a table but thats not any good, I need to import a range (I have named
them in excel)
How can I do this?
Private Sub cmdImport_Click()
strPath = "\\titan\home\jeremyl1\"
strFileName = Dir(strPath & "5HG_Feb_Comm.xls")
MsgBox "Data Loading...", vbInformation, "Jez"
If Len(strFileName) <> 0 Then
DoCmd.TransferSpreadsheet acImport, , strTempTable, strPath &
strFileName, True
End If
MsgBox "Import Complete", vbInformation, "Jez"
End Sub