High everyone i am working on some VBA inside access and am really stuck i get a compile error that says line not defined. this is the code and the error is defined at the line On Error GoTo ImportParticipants_Err
'------------------------------------------------------------
' mcrImportParticipants1
'
'------------------------------------------------------------
Function mcrImportParticipants()
'This procedure imports new participants into the Putts database
'This procedure was written by Matt Pream
On Error GoTo ImportParticipants_Err
Dim ParticipantDialog As Object
Set ParticipantDialog = Application.FileDialog(msoFileDialogOpen)
With ParticipantDialog
.Title = "Select New Participant Lits(s)"
.AllowMultiSelect = True
If .Show = True Then
Dim ImportFileName As Variant
For Each ImportFileName In .SelectedItems
DoCmd.TransferSpreadsheet acImport, 10, _
"tblParticipant", ImportFileName, True, ""
Next
Else
MsgBox "You Cancelled the import"
End If
End With
ImportParticipants_Exit:
Exit Function
ImportParticipant_Err:
MsgBox Error$
End Function
'------------------------------------------------------------
' mcrImportParticipants1
'
'------------------------------------------------------------
Function mcrImportParticipants()
'This procedure imports new participants into the Putts database
'This procedure was written by Matt Pream
On Error GoTo ImportParticipants_Err
Dim ParticipantDialog As Object
Set ParticipantDialog = Application.FileDialog(msoFileDialogOpen)
With ParticipantDialog
.Title = "Select New Participant Lits(s)"
.AllowMultiSelect = True
If .Show = True Then
Dim ImportFileName As Variant
For Each ImportFileName In .SelectedItems
DoCmd.TransferSpreadsheet acImport, 10, _
"tblParticipant", ImportFileName, True, ""
Next
Else
MsgBox "You Cancelled the import"
End If
End With
ImportParticipants_Exit:
Exit Function
ImportParticipant_Err:
MsgBox Error$
End Function