Collapse Dialog Box

  • Thread starter Thread starter Adrian T
  • Start date Start date
A

Adrian T

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
 
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
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top