RgnChange example for Access 95 and 97

The following code for the RgnChange event updates a text box using the GetRgnArea method. You can test it by adding a text box for the lesson described in Outlining, Dragging, and Pasting a Region.

Private Sub Lead1_RgnChange()
    'Declare a local variable.
    Dim MyText As String
    MyText = "Number of pixels in region: "
    MyText = MyText + CStr(Lead1.GetRgnArea)
    Text1.SetFocus
    Text1.Text = MyText
End Sub