View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
jhyatt jhyatt is offline
external usenet poster
 
Posts: 61
Default Userform close button

try this

Private Sub Userform_QueryClose(Cancel As Integer, closeMode As Integer)
If closeMode = 0 Then
Cancel = True
MsgBox "Please use the button!"
End If
End Sub


"AOU" wrote:

Is there a way to disable the close button top right of a userform. I am
after the user only being able to use a commandbutton titled 'Exit'
--
AOU