Use the form .tag property. Set it to one thing to execute and something else to cancel
e.g.,
In form:
Sub Cancel_Click
Tag = "Cancel"
Hide
End Sub
In calling macro:
With oFrm
.Show
If .Tag = "Cancel" Then
Exit Sub
Else
'Do normal processing.
End If
Use the form .tag property. Set it to one thing to execute and something else to cancel
e.g.,
In form:
Sub Cancel_Click
Tag = "Cancel"
Hide
End Sub
In calling macro:
With oFrm
.Show
If .Tag = "Cancel" Then
Exit Sub
Else
'Do normal processing.
End If