View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 1
Default Make a user form 'un-closeable'

Ok,

Now you have to add "Done" Button if you want to get rid of th
userform othewise it will always be there. But here is something tha
will cancel the "X". The "X" will still show but when clicked it wil
not close the form.

Heres the code for it.

Private Sub CommandButton1_Click()
Unload Me
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, closemode A
Integer)
If closemode = vbFormControlMenu Then
Cancel = True
End If
End Sub

HTH

Charle

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