ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform1 Border (https://www.excelbanter.com/excel-programming/274222-re-userform1-border.html)

Tom Ogilvy

Userform1 Border
 
look at Stephen Bullen's site for the FormFun.zip file. It has a workbook
that demonstrates most of the enhancements you can do to Userforms. (and
the code is accessible).

http://www.bmsltd.co.uk/Excel/Default.htm

--
Regards,
Tom Ogilvy

"Neil" wrote in message
...
I have a form in my sheet thats got various buttons on it
to close and do other things, I want to remove the thick
blue border around the form that hosts the "X" button in
the top tight, is thisa possible ?





Tom Ogilvy

Userform1 Border
 
Before you commit to removing the X, are you aware of the queryclose event
which allows you to cancel/control attempts to close the form?

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox Prompt:="Please close the form using the close button"
End If
End Sub


The constants you can check for CloseMode a

vbFormControlMenu
value: 0
The user has chosen the Close command from the Control menu on the
UserForm.

vbFormCode
value: 1
The Unload statement is invoked from code.

vbAppWindows
value: 2
The current Windows operating environment session is ending.

vbAppTaskManager
value: 3
The Windows Task Manager is closing the application.

--
Regards,
Tom Ogilvy


"Neil" wrote in message
...
Thanks for that Tom, the page is quite interesting, I
have had a look at the code for messing with userforms, I
have tried copying the code to a diff sheet, and deleting
unrequired code from the original, in both instances I
get stuck, Im a novice so the volume of interlinked code
makes this like war & piece to me....

Do you have a code snippet anywhere that just removes the
border containg the "X" button from a form ?



-----Original Message-----
look at Stephen Bullen's site for the FormFun.zip file.

It has a workbook
that demonstrates most of the enhancements you can do to

Userforms. (and
the code is accessible).

http://www.bmsltd.co.uk/Excel/Default.htm

--
Regards,
Tom Ogilvy

"Neil" wrote in message
...
I have a form in my sheet thats got various buttons on

it
to close and do other things, I want to remove the

thick
blue border around the form that hosts the "X" button

in
the top tight, is thisa possible ?




.





All times are GMT +1. The time now is 11:26 AM.

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