SafeRef Function Example

Dim anotherObject As New ObjectThatCallsBack
Dim safeMe As My.Class

' Get a safe reference.
Set safeMe = SafeRef(Me)

' Invoke a method on another object, passing the
' safe reference so it can call back.
If Not safeMe Is Nothing Then
	Call anotherObject.CallMeBack(safeMe)
Set safeMe = Nothing

© 1997 Microsoft Corporation. All rights reserved.