Can excel disable close button at right corner of user-form
Thank you
Printable View
Can excel disable close button at right corner of user-form
Thank you
AFAIK, no :cry2:
the simplest solution
[VBA]Private Sub Userform_QueryClose(Cancel As Integer, closemode As Integer)
If closemode = vbFormControlMenu Then
MsgBox "Sorry you must use Cancel or Exit Button"
Cancel = True
End If
End Sub
[/VBA]
Nice solution - I was looking for a "BeforeClose" or "Close" event; no wonder I didn't find it :doh:
Thanks
one more but this wont give any message box
[VBA]Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As _
Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub
[/VBA]
Superb !!!!!!
Very Very Thank you :bow:
If you are interested in a API solution.
http://www.vbforums.com/showthread.php?t=363931
Example download included
Nice solution : I very Love API Function but i don't know
Where i can learn about API Function ?
Thank you very much !!!!
Apart from the curiosity value - why bother?
APIs are very useful in doing something that'd otherwise be impossible in the container application, but what's the point in going outside the container applications code to use another applications code to perform actions in the container app when the (original) container app already has an inbuilt native function to perform that very same action? :dunno
Taken to the extreme, one could possibly use a very complex set of APIs to replace all of the ordinary visual basic code in a workbook, but then - what's the point? :devil2:
I have no argument there johnske. But here in the midwest we have a saying. "There is more than one way to skin a Cat" :devil2:Quote:
Originally Posted by johnske
Down south here we also have a saying - a cat has nine lives, but only one skin :devil2: :rofl:
Here is a list of API functions.Quote:
Originally Posted by zv735
You can also download the API-Guide.
http://allapi.mentalis.org/apilist/apilist.php
Thank you
THank you :clap: