View Full Version : what does it mean


history
04-08-2008, 09:12 AM
Hello Friends,

Please I would like to ask about the meaning of the following CODE
Private Sub Command 12_Click()
On Error GoTo errsub 'Resume Next

DoCmd.RunSQL "DELETE excel.*FROM excell;"
DoCmd.TransferSpreadsheet acImport, 8, "excel", "C:\Book.xls", False, "A1:E7"
MsgBox "All fields have been Imported [excel]"
errsub:

If Err.Number = 3011 Then
MsgBox "[C:\Book.xls]The Excel file path is not right ", 64,
"Duplicate Backup Name"

End If
End Sub

pbaldy
04-08-2008, 09:23 AM
Disregarding what I assume are typos, it empties a table then imports data into it from an Excel file.