Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default searching for a value...

Hi All,

I have the below coding attached to userform1. Everytime combobox1
changes(selecting supplier name), it queries the sheet Suppliers, and returns
back the corresponding supplier number if it's available.
In the Supplier sheet, Column A is the supplier name and Column B is the
supplier number.
Now, what i also need to do, is at the same time, but on a different sheet
(RecData), is bring in two fields of data into variables.
On the RecData sheet, Column A = Supplier name, Col B = supplier number, Col
C = Last reconciliation date, and Col D = priority number.
RecData doesn't contain the same amount of suppliers as in thte supplier
sheet, therefore i cant use the ListIndex from the combobox.

Is there another way i can bring in these two variables? Im not sure on what
the best type find/search i can use.

Cheers,
Tony.
---------------------------------------
Private Sub ComboBox1_Change()
Dim r As Range
Dim s As Range
Dim t As Range
With Sheets("Suppliers")
On Error Resume Next
Set r = .Range("A1")(UserForm1.ComboBox1.ListIndex + 1, 2)
If Err.Number = 1004 Then
Label3.Caption = "N/A"
End If
Label3.Caption = r
strSuppNum = r
End With

'With Sheets("RecData")

'This is where i can't figure out what to do...

' strRecLstCom = s
' strSuppPriNum = t
'End With

End Sub


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
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
searching for tab Kevin R Excel Discussion (Misc queries) 3 January 16th 06 08:55 PM
Searching DQ05 Excel Worksheet Functions 1 September 24th 05 06:08 PM
searching Tracy A Excel Worksheet Functions 2 July 28th 05 08:54 PM
VBA searching a row Fargo Holiday Excel Programming 5 December 24th 03 08:10 PM


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