Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Value From ComboBox On UserForm

I have a user form that I have added 5 columns. When I select one of
the rows it fills in the combobox with the left most data and the rest
is blank. i woudl like the combobox to show all 5 columns.

I am also having trouble reading the value of this box to be used
later on. here is the code that I have and it cycles through each box
and returns boxcount of 0 and box.value returns an error. Thsi was
not happening when I only had one column and was using concatenate to
make columns. This just does nto look as professional.

For Each ctl In Me.Controls 'Check to see if the Comboboxes have
info
If TypeOf ctl Is msforms.ComboBox Then
MsgBox ctl.Name
If ctl.Value < "" Then
BoxCount = BoxCount + 1
Set Box = ctl 'The name of Combobox that is used
End If
End If
Next ctl

Thanks,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Value From ComboBox On UserForm

On Oct 15, 8:46*am, jlclyde wrote:
I have a user form that I have added 5 columns. *When I select one of
the rows it fills in the combobox with the left most data and the rest
is blank. *i woudl like the combobox to show all 5 columns.

I am also having trouble reading the value of this box to be used
later on. *here is the code that I have and it cycles through each box
and returns boxcount of 0 and box.value returns an error. *Thsi was
not happening when I only had one column and was using concatenate to
make columns. *This just does nto look as professional.

* * * For Each ctl In Me.Controls 'Check to see if the Comboboxes have
info
* * * * If TypeOf ctl Is msforms.ComboBox Then
* * * * * * MsgBox ctl.Name
* * * * * * If ctl.Value < "" Then
* * * * * * * * BoxCount = BoxCount + 1
* * * * * * * * Set Box = ctl 'The name of Combobox that is used
* * * * * * End If
* * * * End If
* * Next ctl

Thanks,
Jay


I figured out the Ctl.value it is ctl.text < "" then. I still ahve
no idea on how to show all of the information in my combobox window
after it has been selected. It only shows the first column.
Jay
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Value From ComboBox On UserForm

Comboboxes only show one column's value when you select something.

Maybe it's time to use a listbox???

Or you could extract the values of all the columns and put them in textboxes
(seems a bit of overkill???).

jlclyde wrote:

On Oct 15, 8:46 am, jlclyde wrote:
I have a user form that I have added 5 columns. When I select one of
the rows it fills in the combobox with the left most data and the rest
is blank. i woudl like the combobox to show all 5 columns.

I am also having trouble reading the value of this box to be used
later on. here is the code that I have and it cycles through each box
and returns boxcount of 0 and box.value returns an error. Thsi was
not happening when I only had one column and was using concatenate to
make columns. This just does nto look as professional.

For Each ctl In Me.Controls 'Check to see if the Comboboxes have
info
If TypeOf ctl Is msforms.ComboBox Then
MsgBox ctl.Name
If ctl.Value < "" Then
BoxCount = BoxCount + 1
Set Box = ctl 'The name of Combobox that is used
End If
End If
Next ctl

Thanks,
Jay


I figured out the Ctl.value it is ctl.text < "" then. I still ahve
no idea on how to show all of the information in my combobox window
after it has been selected. It only shows the first column.
Jay


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Value From ComboBox On UserForm

On Oct 15, 11:08*am, Dave Peterson wrote:
Comboboxes only show one column's value when you select something.

Maybe it's time to use a listbox???

Or you could extract the values of all the columns and put them in textboxes
(seems a bit of overkill???).





jlclyde wrote:

On Oct 15, 8:46 am, jlclyde wrote:
I have a user form that I have added 5 columns. *When I select one of
the rows it fills in the combobox with the left most data and the rest
is blank. *i woudl like the combobox to show all 5 columns.


I am also having trouble reading the value of this box to be used
later on. *here is the code that I have and it cycles through each box
and returns boxcount of 0 and box.value returns an error. *Thsi was
not happening when I only had one column and was using concatenate to
make columns. *This just does nto look as professional.


* * * For Each ctl In Me.Controls 'Check to see if the Comboboxes have
info
* * * * If TypeOf ctl Is msforms.ComboBox Then
* * * * * * MsgBox ctl.Name
* * * * * * If ctl.Value < "" Then
* * * * * * * * BoxCount = BoxCount + 1
* * * * * * * * Set Box = ctl 'The name of Combobox that is used
* * * * * * End If
* * * * End If
* * Next ctl


Thanks,
Jay


I figured out the Ctl.value it is ctl.text < "" then. *I still ahve
no idea on how to show all of the information in my combobox window
after it has been selected. *It only shows the first column.
Jay


--

Dave Peterson- Hide quoted text -

- Show quoted text -


The left is the most important. I think I will stick with the
Combobox. Thanks for the help.
Jay
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
Trouble with a ComboBox on a UserForm ryguy7272 Excel Discussion (Misc queries) 1 February 20th 08 09:02 PM
ComboBox on a UserForm LLoyd Excel Worksheet Functions 2 February 20th 08 09:01 PM
Trouble with a ComboBox on a UserForm ryguy7272 Excel Worksheet Functions 1 February 19th 08 07:41 AM
Userform combobox question teepee Excel Discussion (Misc queries) 20 May 16th 07 09:42 AM
Userform w/ComboBox D.Parker Excel Discussion (Misc queries) 2 May 6th 05 04:28 PM


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