ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Collapse Dialog Box (https://www.excelbanter.com/excel-programming/311217-collapse-dialog-box.html)

Adrian T[_2_]

Collapse Dialog Box
 
Hi:


Does anyone know how to add a collapse dialog button on a
user form? A collapse dialog button is usually used in
a 'data range' box, such as in 'Chart Wizard - Step 2 of
4 - Chart Source Data' window.


Thanks in advance,
Adrian T

Tom Ogilvy

Collapse Dialog Box
 
Use a refedit control. It is built in.

--
Regards,
Tom Ogilvy

"Adrian T" wrote in message
...
Hi:


Does anyone know how to add a collapse dialog button on a
user form? A collapse dialog button is usually used in
a 'data range' box, such as in 'Chart Wizard - Step 2 of
4 - Chart Source Data' window.


Thanks in advance,
Adrian T




Nick Hodge

Collapse Dialog Box
 
Adrian

To programmatically add a 'RefEdit' control you will need to set a reference
in advance to the library but the code could then be like that below. Click
the user for and it adds a RefEdit control and moves it down and right from
the top left of the form and then for fun uses the newly created controls
name (RefEdit1) to set the control tip

Private Sub UserForm_Click()
Dim rRefEdit As RefEdit.RefEdit
Set rRefEdit = Me.Controls.Add("Refedit.ctrl", "Refedit1", Visible)
With rRefEdit 'Uses refedit object variable
.Top = 50
.Left = 50
End With
Me.Controls("Refedit1").ControlTipText = "Tooltip using new control's name"
'uses object name
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Adrian T" wrote in message
...
Hi:


Does anyone know how to add a collapse dialog button on a
user form? A collapse dialog button is usually used in
a 'data range' box, such as in 'Chart Wizard - Step 2 of
4 - Chart Source Data' window.


Thanks in advance,
Adrian T





All times are GMT +1. The time now is 01:56 AM.

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