Combo Box selection to validate FORM population

HDfatboy03

Board Regular
Joined
May 23, 2010
Messages
62
Trying to create a form where the Combo Box "cboCourse" is loaded from a sheet "CourseInfo". There are 2 ranges "CLkup" containing 2 columns txtCourse and txtTbox and "Database" containing all the columns in the "CourseInfo". Currently my combo box is working thru the properties option Rowsource "CourseInfo!CLkUp" and is working. It's the next part where my opportunity lies ... lol

What I am trying to accomplish is when a selection is made in the combo box example: "Lindale GC (Black)" ... I want the rest of the text fields in the form "txtPar", "txtRating" & "txtSlope" to populate automatically from the excel worksheet "CourseInfo".

Please point me in the right direction, an example, something to read. I am 3 weeks new to all of this ... what started out as a simple spread sheet now seems to have a life of its own. Starting to get a lil addicted ... lol Any help will be greatly appreciated.

thanks HDfatboy03
 
Can you not post some sample data?

That's probably more important than the code.

Oh and by the way - definitely don't use TopIndex.

TopIndex returns the index of the first item visible in the listbox whether it's selected or not.:)
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Thanks for all your help ... got it figured out ... I will post solution on Friday ... I'm late for work

thanks again

HDfatboy03
 
Upvote 0
SOLVED:

Here is what got to work FINALLY ... lol

<CODE STARTS>

Private Sub cboCourse_Change()
Dim r As Long
r = Me.cboCourse.ListIndex + 2
Me.txtTeesBox.Value = Worksheets("CourseInfo").Cells(r, 2).Value
Me.txtQty.Value = Worksheets("CourseInfo").Cells(r, 5).Value
Me.txtLoc.Value = Worksheets("CourseInfo").Cells(r, 3).Value

End Sub
<CODE ENDS>

Once again thanks for the HELP!!!

HDfatboy03
 
Upvote 0

Forum statistics

Threads
1,215,890
Messages
6,127,598
Members
449,388
Latest member
macca_18380

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top