#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default User Form

is it possible to remove the caption and border from a user form ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default User Form

UserForm1.BorderStyle = fmBorderStyleNone
UserForm1.Caption = ""

"amit" wrote:

is it possible to remove the caption and border from a user form ?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default User Form

hi joel - thx for your reply........my question was is it possible to totally
remove the strip with the X close button from the userform.....

thx.

"Joel" wrote:

UserForm1.BorderStyle = fmBorderStyleNone
UserForm1.Caption = ""

"amit" wrote:

is it possible to remove the caption and border from a user form ?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default User Form

Not as far as i know. If you just need to control the use of the "X",
have a look at the queryclose event.

hth

Keith

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default User Form

Hi Amit,

Yes, but by using an API call
Stephen Bullen wrote code to to this and more things.

Look at his page http://www.bmsltd.ie/Excel/SBXLPage.asp for FormFun.zip.
Regards
Jean-Yves

"amit" wrote in message
...
hi joel - thx for your reply........my question was is it possible to
totally
remove the strip with the X close button from the userform.....

thx.

"Joel" wrote:

UserForm1.BorderStyle = fmBorderStyleNone
UserForm1.Caption = ""

"amit" wrote:

is it possible to remove the caption and border from a user form ?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default User Form

Hi amit,
Do not forget a button to close the userform.

Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function SetWindowLong& Lib "user32" Alias _
"SetWindowLongA" (ByVal hWnd&, ByVal nIndex&, ByVal wNewWord&)
Private Declare Function DrawMenuBar& Lib "user32" (ByVal hWnd&)

Private Sub UserForm_Initialize()
Dim hWnd&
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84080080 ' remove caption
DrawMenuBar hWnd
SetWindowLong hWnd, -20, &H40000 ' remove borders
End Sub

Regards


"amit" a écrit dans le message de
...
is it possible to remove the caption and border from a user form ?


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
Call user form from ThisWorkbook; close file if form closed XP Excel Programming 2 July 20th 07 07:04 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 12:40 PM.

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

About Us

"It's about Microsoft Excel"