Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Combobox item selection+pop up list

Hello,

I have a control box that has two options in the drop-down. I accomplished
to have it so that once one of the options is selected; a list of the outputs
is displayed in the excel spreadsheet. The problem is that when the other
option within the drop down is selected theres no list output. I need it to
generate a different output list for each option provided in the drop down.

What i have as a code which spits out the list for one option is :

Private Sub ComboBox1_Change()
With Me.ComboBox1.TopLeftCell
..Offset(0, 5) = "NIN"
..Offset(0, 6) = "NOUT"
..Offset(0, 7) = "IND"
..Offset(0, 8) = "TITLE"
..Offset(0, 9) = "CASE"
End With
End Sub


Any Help PLEASE ?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Combobox item selection+pop up list

hi,
your combo box has 2 option but you only gave it one list of results. try
something like this...
Private Sub ComboBox1_Change()
if me.combobox1.value = "value1" then
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
else
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "something"
.Offset(0, 6) = "else"
.Offset(0, 7) = "more"
.Offset(0, 8) = "ofmy"
.Offset(0, 9) = "stuff"
End With

End Sub

tested in xp2003. works. at least on wendsdays.
regards
FSt1
"N.F" wrote:

Hello,

I have a control box that has two options in the drop-down. I accomplished
to have it so that once one of the options is selected; a list of the outputs
is displayed in the excel spreadsheet. The problem is that when the other
option within the drop down is selected theres no list output. I need it to
generate a different output list for each option provided in the drop down.

What i have as a code which spits out the list for one option is :

Private Sub ComboBox1_Change()
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
End Sub


Any Help PLEASE ?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Combobox item selection+pop up list

Thanks alot for your help. I do get your idea but when I pasted it in try to
run it no list is generated in either option. Earlier it gave me an error
that said something like: Block End Statement ....


"FSt1" wrote:

hi,
your combo box has 2 option but you only gave it one list of results. try
something like this...
Private Sub ComboBox1_Change()
if me.combobox1.value = "value1" then
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
else
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "something"
.Offset(0, 6) = "else"
.Offset(0, 7) = "more"
.Offset(0, 8) = "ofmy"
.Offset(0, 9) = "stuff"
End With

End Sub

tested in xp2003. works. at least on wendsdays.
regards
FSt1
"N.F" wrote:

Hello,

I have a control box that has two options in the drop-down. I accomplished
to have it so that once one of the options is selected; a list of the outputs
is displayed in the excel spreadsheet. The problem is that when the other
option within the drop down is selected theres no list output. I need it to
generate a different output list for each option provided in the drop down.

What i have as a code which spits out the list for one option is :

Private Sub ComboBox1_Change()
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
End Sub


Any Help PLEASE ?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Combobox item selection+pop up list

Got it!. Thanks ALOT
It was simply missing a " End If " statement


"N.F" wrote:

Thanks alot for your help. I do get your idea but when I pasted it in try to
run it no list is generated in either option. Earlier it gave me an error
that said something like: Block End Statement ....


"FSt1" wrote:

hi,
your combo box has 2 option but you only gave it one list of results. try
something like this...
Private Sub ComboBox1_Change()
if me.combobox1.value = "value1" then
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
else
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "something"
.Offset(0, 6) = "else"
.Offset(0, 7) = "more"
.Offset(0, 8) = "ofmy"
.Offset(0, 9) = "stuff"
End With

End Sub

tested in xp2003. works. at least on wendsdays.
regards
FSt1
"N.F" wrote:

Hello,

I have a control box that has two options in the drop-down. I accomplished
to have it so that once one of the options is selected; a list of the outputs
is displayed in the excel spreadsheet. The problem is that when the other
option within the drop down is selected theres no list output. I need it to
generate a different output list for each option provided in the drop down.

What i have as a code which spits out the list for one option is :

Private Sub ComboBox1_Change()
With Me.ComboBox1.TopLeftCell
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
End With
End Sub


Any Help PLEASE ?


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
How to Auto-populate cell based on selection of a list item AK9955 Excel Discussion (Misc queries) 2 April 30th 07 10:04 AM
Combobox - can't get click event to run for first item in the list Dale Excel Programming 3 August 9th 06 02:55 AM
combobox list item with superscript boyze Excel Programming 1 April 26th 06 06:07 PM
Automated Delete Item from ComboBox List ToferKing Excel Programming 10 April 23rd 06 07:46 PM
Userform: Textbox changing with selection in combobox (list) NorTor[_3_] Excel Programming 3 June 8th 04 10:19 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"