Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Making a frame visible or not using a command button

[Excel 2003]
I have a userform with a frame on it

The form displays some text boxes. I would like the default setting of the
frame to be not visible to the user, so I can set the property as such.

What I would like is to have a command button on the form which makes the
frame visible :

frame.visible=True??

and a command button within the frame to hide the frame

frame.visible=False??

Can anyone help?

Thankyou,

Roger
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Making a frame visible or not using a command button

Hi Roger

Copy the below code behind the userform. CommandButton1 is within the Frame
and CommandButton2 is outside the frame

Private Sub CommandButton1_Click()
Me.Frame1.Visible = False
End Sub

Private Sub CommandButton2_Click()
Me.Frame1.Visible = True
End Sub

Private Sub UserForm_Initialize()
Me.Frame1.Visible = False
End Sub

--
Jacob


"Roger on Excel" wrote:

[Excel 2003]
I have a userform with a frame on it

The form displays some text boxes. I would like the default setting of the
frame to be not visible to the user, so I can set the property as such.

What I would like is to have a command button on the form which makes the
frame visible :

frame.visible=True??

and a command button within the frame to hide the frame

frame.visible=False??

Can anyone help?

Thankyou,

Roger

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Making a frame visible or not using a command button

use one command button - this will toggle the frame visibility between on
and off
Private Sub CommandButton1_Click()
Frame1.Visible = NOT Frame1.Visible
End Sub


"Roger on Excel" wrote in message
...
[Excel 2003]
I have a userform with a frame on it

The form displays some text boxes. I would like the default setting of
the
frame to be not visible to the user, so I can set the property as such.

What I would like is to have a command button on the form which makes the
frame visible :

frame.visible=True??

and a command button within the frame to hide the frame

frame.visible=False??

Can anyone help?

Thankyou,

Roger


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Making a frame visible or not using a command button

Thankyou Jacob And Patrick - both approaches are equally viable - Have a
great week,

Roger

"Roger on Excel" wrote:

[Excel 2003]
I have a userform with a frame on it

The form displays some text boxes. I would like the default setting of the
frame to be not visible to the user, so I can set the property as such.

What I would like is to have a command button on the form which makes the
frame visible :

frame.visible=True??

and a command button within the frame to hide the frame

frame.visible=False??

Can anyone help?

Thankyou,

Roger

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
Command button continues to be visible! CAPTGNVR[_2_] Excel Programming 11 October 8th 08 05:18 PM
command button in a frame: strange phenomena Arne Excel Programming 0 September 7th 07 09:26 AM
Autofilter: jump from visible row to visible row by command button [email protected] Excel Programming 0 November 4th 06 09:04 PM
Command Button Always Visible in window avveerkar Excel Discussion (Misc queries) 2 January 11th 06 12:21 PM
Make Command Button visible only in .xlt? RPIJG[_23_] Excel Programming 2 May 17th 04 07:14 PM


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