VB5, VB6Fill Out the Class Module
Option Explicit

'local variable(s) to hold property value(s)
Private mvarCancelOperation As Boolean 'local copy
Private mvarWorkDone As Integer 'local copy
Private mvarEstimatedWorkNeeded As Integer 'local copy

Public Property Get EstimatedWorkNeeded() As Integer
	EstimatedWorkNeeded = mvarEstimatedWorkNeeded
End Property

Public Property Get WorkDone() As Integer
	WorkDone = mvarWorkDone
End Property

Public Property Let CancelOperation(ByVal vData _
	As Boolean)
	mvarCancelOperation = vData
End Property

Public Property Get CancelOperation() As Boolean
	CancelOperation = mvarCancelOperation
End Property

Listing 2 Using an automation object as an event parameter is an intuitive and easy way to pass user-modifiable information to the container. It also is a great way to ensure the container handles your event properly in cases where a container cannot handle parameters passed by reference.