Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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 ?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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 ?




.



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
Macro to filter dates using Userform1 & printing Mel[_5_] Excel Discussion (Misc queries) 0 March 11th 10 04:05 PM
border on last cell of page effects border on beginning cell of ne GaryE Excel Discussion (Misc queries) 0 March 23rd 09 05:47 AM
Excel VB - show userform1 (at same time) minimized application win Dr.CIMS Excel Discussion (Misc queries) 1 September 13th 07 02:14 AM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM
Userform1 Border John Wilson Excel Programming 0 August 12th 03 04:08 PM


All times are GMT +1. The time now is 03:33 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"