View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RyanH RyanH is offline
external usenet poster
 
Posts: 586
Default Multipage Pages will not show controls when enabled

I have a UserForm with a Combobox named "cboIllumination" and a MultiPage
name "mpgIllumination". When the UserForm is Intialized all the pages in the
mpgIllumination.Enabled = False and cboIllumination.ListIndex = 0.
Here is the problem. As the user changes cboIllumation I want the
associated page in mpgIllumination to be enabled and display the controls in
it. The code below will enable the page, but the controls are not visible
until I select it, why? Is it possible to make sure the controls are visible
when the pages enable property = True.

Private Sub cboIllumination_Change()

Dim pg As Page

'disables all three pages
For Each pg In mpgIllumination.Pages
pg.Enabled = False
Next pg

'enables the associated page that was selected in listbox
If cboIllumination.ListIndex < 0 Then
With mpgIllumination.Pages(cboIllumination.ListIndex - 1)
.Enabled = True
.Visible = True
End With
End If

End Sub
--
Cheers,
Ryan