LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Troubles Jonas Krogh Excel Discussion (Misc queries) 1 October 22nd 09 11:14 AM
COM Add-in Troubles Howard Excel Discussion (Misc queries) 0 May 22nd 07 01:59 PM
Chart troubles [email protected] Excel Worksheet Functions 2 May 12th 07 02:36 PM
IF troubles JG Excel Worksheet Functions 6 December 24th 06 04:58 AM
Troubles opening a CSV file from code Bas van Dijk Excel Programming 0 January 19th 04 01:21 PM


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