Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Dynamic Entries

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Dynamic Entries

Perhaps

Private Sub OptionButton1_Click()
ListBox1.RowSource = "A1:A10"
ListBox1.ListIndex = 1

End Sub

Private Sub OptionButton2_Click()
ListBox1.RowSource = "B1:B10"
ListBox1.ListIndex = 1

End Sub

--
HTH

Bob Phillips

"Richard" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dynamic Entries

A userform? A worksheet made to look like a paper form? what do you mean by
Form?

How does the user make a choice?

When you say a list will appear - you mean a listbox?

The more detail you can describe, the more focused the answer will be.

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Dynamic Entries

There is for example; combobox A where there are say 2 items. If Item #1 is
selected, then Combobox B has say 10 items to choose from. If item #2 is
selected from combobox A, then combobox B has 7 items to choose from.

Thanks,
Richard

"Tom Ogilvy" wrote:

A userform? A worksheet made to look like a paper form? what do you mean by
Form?

How does the user make a choice?

When you say a list will appear - you mean a listbox?

The more detail you can describe, the more focused the answer will be.

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Dynamic Entries

Private Sub ComboBox1_Change()
If ComboBox1.Value = "a" Then
ComboBox2.RowSource = "A1:A10"
Else
ComboBox2.RowSource = "B1:B10"
End If
ComboBox2.ListIndex = 0

End Sub


--
HTH

Bob Phillips

"Richard" wrote in message
...
There is for example; combobox A where there are say 2 items. If Item #1

is
selected, then Combobox B has say 10 items to choose from. If item #2 is
selected from combobox A, then combobox B has 7 items to choose from.

Thanks,
Richard

"Tom Ogilvy" wrote:

A userform? A worksheet made to look like a paper form? what do you

mean by
Form?

How does the user make a choice?

When you say a list will appear - you mean a listbox?

The more detail you can describe, the more focused the answer will be.

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
Hello,

I am trying to make a form where there will be a choice between A and

B.
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
Dynamic pivot table linked to dynamic excel spreadsheets FErd Excel Worksheet Functions 0 April 29th 10 10:44 PM
Summ entries using a dynamic sheet name Raul[_2_] Excel Worksheet Functions 1 November 23rd 09 04:59 PM
Combine Multiple Entries with differing amounts of entries Katie Excel Worksheet Functions 2 November 28th 07 09:53 PM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM


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