Hi All,
I want to call a sub called "findEvents(date1, date2)"
from a userform button click but am getting the "sub or function undefined error" this is Excel 2003
I have tried using:
Call Sheets("Data").findEvents(startDay, endDay)
instead but that also gives me an error. What am I missing? Thanks.
I want to call a sub called "findEvents(date1, date2)"
from a userform button click but am getting the "sub or function undefined error" this is Excel 2003
Code:
Private Sub Create_Click()
Dim startDay, endDay As Date
If MM1CB <> "" And MM2CB <> "" And DD1CB <> "" And DD2CB <> "" And StartHourCB <> "" _
And EndHourCB <> "" And StartMinuteCB <> "" And EndMinuteCB <> "" And YY1CB <> "" _
And YY2CB <> "" Then
startDay = MM1CB & "/" & DD1CB & "/" & YY1CB & " " & StartHourCB & StartMinuteCB
endDay = MM2CB & "/" & DD2CB & "/" & YY2CB & " " & EndHourCB & EndMinuteCB
Call findEvents(startDay, endDay)
Else
MsgBox "All Fields Required"
End If
End Sub
I have tried using:
Call Sheets("Data").findEvents(startDay, endDay)
instead but that also gives me an error. What am I missing? Thanks.
Last edited: