Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Troubles
Hi, I am attempting to write code that will take a comboBox selection and then autofill other combo boxes with related selections (in the same row on a lookuplist). I believe i have the idea correct, but i am struggling with actual implementation. Any and all comments and suggestions are greatly appreciated. Code: -------------------- Private Sub AutoFill() Dim DesiredColumn As Range Dim RoundRow As Range Dim RowNumber As Range Dim ws As Worksheet Set ws = Worksheets("LookUpLists") 'Specifies the desired column as the Description Column Set DesiredColumn = ws.Range(f2, F1100) 'Searches for user's entry into Description Combobox Set FoundRow = DesiredColumn.Find(cboDescription.Value, f2, xlValues, , xlByColumns) 'Specifies Row # of users selection Set RowNumber = FoundRow.Row 'Assigns the values from the accompaning columns to the combo box value cboMfgrNumber.Value = ws.Cells(RowNumber, 7).Value cboPacNumber.Value = ws.Cells(RowNumber, 8).Value End Sub -------------------- -- merritts ------------------------------------------------------------------------ merritts's Profile: http://www.excelforum.com/member.php...o&userid=35803 View this thread: http://www.excelforum.com/showthread...hreadid=564838 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Troubles | Excel Discussion (Misc queries) | |||
COM Add-in Troubles | Excel Discussion (Misc queries) | |||
Chart troubles | Excel Worksheet Functions | |||
IF troubles | Excel Worksheet Functions | |||
Troubles opening a CSV file from code | Excel Programming |