#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Help with Userforms

Hello

just a quick question about userforms.

i want to disable the close button on the top right

how can i do that???
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Help with Userforms

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???

  #3   Report Post  
Posted to microsoft.public.excel.misc
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???

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see only youre userforms?? tomro1 Excel Discussion (Misc queries) 1 June 15th 06 11:04 AM
HELP WITH USERFORMS NEEDED!!! gem Excel Discussion (Misc queries) 3 June 13th 06 10:20 PM
Userforms & Pocket PC ajw150 Excel Discussion (Misc queries) 0 December 7th 05 12:44 PM
Help Userforms / Excel SUMIF Hopest Excel Worksheet Functions 4 June 3rd 05 05:38 PM
Open Userforms from a Dropdown list skid812pb Excel Discussion (Misc queries) 0 May 23rd 05 11:28 PM


All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"