Thread: Dynamic Entries
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Dynamic Entries

Hi,
Assuming you have:
- 2 option buttons: optA and optB
- a frame fraA containing the controls (options buttons or listbox...) to be
displayed when optA is selected
- a frame fraB containing the controls (options buttons or listbox...) to be
displayued when optB is selected.
Use the code below to alternate the display when optA or optB is clicked.

'--------------------------------------------
Sub ChangeForm()
If optA.Value = True Then
fraB.Visible = False
fraA.Visible = True
Else
fraA.Visible = False
fraB.Visible = True
End If
End Sub

Private Sub optA_Change()
ChangeForm
End Sub

Private Sub optB_Change()
ChangeForm
End Sub
'--------------------------------------

Regards,
Sébastien

"Richard" wrote:

Hello,

I am trying to make a form where there will be a choice between A and B.
Should option A be selected within the form, I need a list to appear - say
options 1-10; should B be selected, I need a different list to appear. Can
anybody shed some insight please?

Thanks in advance,
Richard