USerForm Code
Option Explicit
Public EnableEvents As Boolean
------------------
Private Sub frmHistology_Initialize(ByVal txt_Blocks As Integer, Optional ByVal Instructions As String, Optional PIName As String, Optional ptrPID As Range, Optional ListBox2 As Variant)
On Error GoTo mError
Me.EnableEvents = True
txt_Blocks.Value = 0
frmHistology.txtAmount.Value = UserTime
mError:
End Sub
------------------------
Sub within UserForm
Private Sub btn_Quit_Click()
If Me.EnableEvents = False Then
Exit Sub
End If
Unload frmHistology
End Sub
|