View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Panagiotis Marantos Panagiotis Marantos is offline
external usenet poster
 
Posts: 10
Default Help with Userforms

that works perfect

thanks for that

i was trying to find something in the userform porperties similarly to the
access forms properties.

never though to prevent by code

"Tom Hutchins" wrote:

Add the macro below to the userform code module:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "You can't close the dialog like this!"
End If
End Sub

Here is where I got that code:
http://www.erlandsendata.no/english/...gspreventclose

Hope this helps,

Hutch

"Panagiotis Marantos" wrote:

Hello

just a quick question about userforms.

i want to disable the close button on the top right

how can i do that???