G
geoff_ness
I have defined a class to handle the user interface layer between a
form and a worksheet. The below is what is contained in the class
module:
Public Event GetJudicialOfficers(ByRef vsJOList As Variant)
Public Event GetCourtRooms(ByRef vsCourtrooms As Variant)
' Pick up change in Judicial Officer type from form
Public Sub JOTypeSelected(ByVal sType As String)
Dim vsOfficers As Variant
' Get the list of JOs from the return
vsOfficers = vUpdateJOList(sType)
' Pass the list back to the form
RaiseEvent GetJudicialOfficers(vsOfficers)
End Sub
Public Sub CourtSelected(ByVal sCourt As String)
Dim vsRooms As Variant
' Get the list of courtrooms based on selected court
vsRooms = vUpdateCourtList(sCourt)
' Pass the list back to the form
RaiseEvent GetCourtRooms(vsRooms)
End Sub
This compiles fine in both Excel 2003 and 2007. However in Excel 97
all the lines with either 'Public Event' or 'RaiseEvent' generate a
compile error (Identifier expected). Clearly this version of VBA does
not recognise these identifiers, I'm assuming along the same lines as
with Enum. Can anyone confirm that this is the case?
Cheers
Geoff
form and a worksheet. The below is what is contained in the class
module:
Public Event GetJudicialOfficers(ByRef vsJOList As Variant)
Public Event GetCourtRooms(ByRef vsCourtrooms As Variant)
' Pick up change in Judicial Officer type from form
Public Sub JOTypeSelected(ByVal sType As String)
Dim vsOfficers As Variant
' Get the list of JOs from the return
vsOfficers = vUpdateJOList(sType)
' Pass the list back to the form
RaiseEvent GetJudicialOfficers(vsOfficers)
End Sub
Public Sub CourtSelected(ByVal sCourt As String)
Dim vsRooms As Variant
' Get the list of courtrooms based on selected court
vsRooms = vUpdateCourtList(sCourt)
' Pass the list back to the form
RaiseEvent GetCourtRooms(vsRooms)
End Sub
This compiles fine in both Excel 2003 and 2007. However in Excel 97
all the lines with either 'Public Event' or 'RaiseEvent' generate a
compile error (Identifier expected). Clearly this version of VBA does
not recognise these identifiers, I'm assuming along the same lines as
with Enum. Can anyone confirm that this is the case?
Cheers
Geoff