View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 1
Default VBA - Forms Exit Errors

jordanctc

This should prevent the user fron using the "X".



Private Sub userform_QueryClose(Cancel As Integer, CloseMode A
Integer)
Application.ScreenUpdating = False
If CloseMode = vbFormControlMenu Then
MsgBox "You Have to use the Exit Button to close!"
Cancel = True
End If
End Sub


HTH

Charle

--
Message posted from http://www.ExcelForum.com