Re: Help. How do I disable a UserForm's close (X) icon?



Private Sub UserForm_QueryClose(Cancel As Integer, UnloadMode As Integer)
'Prevent user from closing with the Close box in the title bar.
If UnloadMode = vbFormControlMenu Then
Cancel = 1
MsgBox "Please use the " & Mid$(btnExit.Caption, 1) & " button to
close the Form", _
vbInformation + vbOKOnly, "Close box cannot be used to close the
Form"
End If
End Sub
--
http://www.standards.com/; See Howard Kaikow's web site


.


Loading