Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default how do I reference data from a Combo Box?

I'm very new to this. So please bare with me:

I created three combo boxs, each with several entries in it. I woulld like
a command button to be used to read these entries to fill out a table. I
then would like to reference this table.

In a nut shell it is going to be an order form for customers to fill out so
that I can process their selected size, collors and quantities of the widgets
I'm selling.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how do I reference data from a Combo Box?

Private Sub CommandButton1_Click()
with worksheets("Data")
.Range("A1").Value = Combobox1.Value
.Range("A2").Value = Combobox2.Value
.Range("A3").Value = Combobox3.Value
end With
End sub

Assumes comboboxes from the control toolbox toolbar one either a worksheet
(code must be in the sheet module)
or a Userform
(code must be in the userform module)

You can always reference the cells to get the information.

--
Regards,
Tom Ogilvy



"Rick" wrote:

I'm very new to this. So please bare with me:

I created three combo boxs, each with several entries in it. I woulld like
a command button to be used to read these entries to fill out a table. I
then would like to reference this table.

In a nut shell it is going to be an order form for customers to fill out so
that I can process their selected size, collors and quantities of the widgets
I'm selling.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default how do I reference data from a Combo Box?

Tom,

Thanks. That helped very much. But now I have another problem. I really
should be updating a table instead of a row of cells because every time the
user chooses from the list it updates the same cells. In other words the
user can continually choose from the drop down list and hit the command
button to "add to his basket". I could enter logic that would add '1' to the
next row but that is probably not the correct approach.

I tried to create a table but very time I select the cell range it says "The
selection is invalid". I then tried that Pivot Table (never heard of that)
and that also failed... in glorious fashion. It is very clear I have no idea
what the heck I'm doing.

But my form and combo boxes sure look nice!
"Tom Ogilvy" wrote:

Private Sub CommandButton1_Click()
with worksheets("Data")
.Range("A1").Value = Combobox1.Value
.Range("A2").Value = Combobox2.Value
.Range("A3").Value = Combobox3.Value
end With
End sub

Assumes comboboxes from the control toolbox toolbar one either a worksheet
(code must be in the sheet module)
or a Userform
(code must be in the userform module)

You can always reference the cells to get the information.

--
Regards,
Tom Ogilvy



"Rick" wrote:

I'm very new to this. So please bare with me:

I created three combo boxs, each with several entries in it. I woulld like
a command button to be used to read these entries to fill out a table. I
then would like to reference this table.

In a nut shell it is going to be an order form for customers to fill out so
that I can process their selected size, collors and quantities of the widgets
I'm selling.

Thanks

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
Combo Box & value reference deepak Excel Discussion (Misc queries) 1 September 30th 09 05:12 PM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
how to give cell reference using Combo Boxes in Excel? Joseph Excel Discussion (Misc queries) 2 June 3rd 05 11:59 AM
dependent combo box list, with indirect reference Iyue Excel Discussion (Misc queries) 1 February 24th 05 10:45 PM
VLooking Reference in Combo Box Shauna Koppang Excel Programming 8 August 21st 03 12:32 AM


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