ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   is preventing the appearence of the close symbol possible? (https://www.excelbanter.com/excel-programming/293156-preventing-appearence-close-symbol-possible.html)

Marta[_2_]

is preventing the appearence of the close symbol possible?
 
Hi,
Can I prevent the appearence of the "X" symbol (for closing the window) on a
user form via a macro?. I'll be happy to hear any answers. Thanks in advance
whoever creates a solution.



Tom Ogilvy

is preventing the appearence of the close symbol possible?
 
Look at the formfun.zip download from Stephen Bullen's site

http://www.bmsltd.ie

go to the excel page.

--
Regards,
Tom Ogilvy

"Marta" wrote in message
...
Hi,
Can I prevent the appearence of the "X" symbol (for closing the window) on

a
user form via a macro?. I'll be happy to hear any answers. Thanks in

advance
whoever creates a solution.





Bob Umlas[_3_]

is preventing the appearence of the close symbol possible?
 
Not as far as I know, but you CAN disable its functionality:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub

Bob Umlas
Excel MVP

"Marta" wrote in message
...
Hi,
Can I prevent the appearence of the "X" symbol (for closing the window) on

a
user form via a macro?. I'll be happy to hear any answers. Thanks in

advance
whoever creates a solution.





Marta[_2_]

is preventing the appearence of the close symbol possible?
 
Thanks to Tom and Bob,
I'll give both a try...

"Bob Umlas" wrote in message
...
Not as far as I know, but you CAN disable its functionality:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub

Bob Umlas
Excel MVP

"Marta" wrote in message
...
Hi,
Can I prevent the appearence of the "X" symbol (for closing the window)

on
a
user form via a macro?. I'll be happy to hear any answers. Thanks in

advance
whoever creates a solution.







Jon Peltier

is preventing the appearence of the close symbol possible?
 
I usually divert the click to the Cancel button, since obviously the
user wants out.

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then cmdCancel_Click
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Bob Umlas wrote:

Not as far as I know, but you CAN disable its functionality:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub

Bob Umlas
Excel MVP

"Marta" wrote in message
...

Hi,
Can I prevent the appearence of the "X" symbol (for closing the window) on


a

user form via a macro?. I'll be happy to hear any answers. Thanks in


advance

whoever creates a solution.








All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com