View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Andrew[_16_] Andrew[_16_] is offline
external usenet poster
 
Posts: 66
Default Make a user form 'un-closeable'

Insert the following in your form code:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Dim vbResponse As VbMsgBoxResult
vbResponse = MsgBox("Do you want to close this form?", vbYesNo)
If vbResponse = vbNo Then Cancel = True
End Sub

Regards,
Andrew

peekbo wrote in message ...
So now that I figured out how to work underneath a user form - how can i
make the box uncloseable?

i.e. Everytime you try to click the 'x' - it displays cannot close.


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