LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Can I declare an event in Excel 97?

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Declare Function for global use then call on change event [email protected] Excel Programming 1 November 16th 07 04:26 PM
How to declare global variable in Excel VBA? Sing Excel Programming 1 September 23rd 07 04:50 AM
how to declare local variables for Excel.Workbook at runtime. Daffo Excel Discussion (Misc queries) 0 October 9th 06 12:19 PM
To declare or not to declare Alan Beban[_2_] Excel Programming 9 October 29th 04 10:49 PM
How to declare variable as Excel constant? John Wirt[_6_] Excel Programming 2 August 22nd 04 05:41 PM


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"