Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default using find with a combo box

I have a userform (ufRepInfo) that fills about 30 text/check boxes when a
user hits the commandbutton (cbFindButton). Currently I have it where when
(cbFind) is pressed it looks up the values in the worksheet (Sheet1) for all
the text/check boxes based on the value entered into the textbox (tbZipCode).
This is working fine but now I need it perform a secondary check based on
the value entered in a combobox (cbMarkets), which has 5 different possible
values (We will call them A, B, C, D, E and they are represented as separate
columns in the worksheet and as checkboxes on the ufRepInfor). Basically
what I am looking for is to make it so that when I hit the Find button it
first looks in the worksheet for the value in (tbZipCode) and then also
checks the for the value in (cbMarkets). So if I entered "90210" into
tbZipCode and "C" into (cbMarkets) I want it to return the the rep info from
the line in the worksheet which has both 90210 as a zip code and the column
for "C" with a check in it. Here is my code currently and as I said it works
for finding the zip code. Thanks for any help I can get, I realize this is
maybe a little confusing but I tried to give as much detail as I possibly can
but only put the code in for two of the textboxes as the rest is basically
the same.

Private Sub cbFindButton_Click()
'Find Rep Info
tbRepNumber.Value =
Sheet1.Columns(1).Find(Val(tbZipCode.Value)).Offse t(0, 1).Value
tbRepName.Value = Sheet1.Columns(1).Find(Val(tbZipCode.Value)).Offse t(0,
2).Value
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default using find with a combo box

Somebody please help, even it is to say that you didn't understand my problem
then I will at least know I need to do a better job of explaining it.

"aintlifegrand79" wrote:

I have a userform (ufRepInfo) that fills about 30 text/check boxes when a
user hits the commandbutton (cbFindButton). Currently I have it where when
(cbFind) is pressed it looks up the values in the worksheet (Sheet1) for all
the text/check boxes based on the value entered into the textbox (tbZipCode).
This is working fine but now I need it perform a secondary check based on
the value entered in a combobox (cbMarkets), which has 5 different possible
values (We will call them A, B, C, D, E and they are represented as separate
columns in the worksheet and as checkboxes on the ufRepInfor). Basically
what I am looking for is to make it so that when I hit the Find button it
first looks in the worksheet for the value in (tbZipCode) and then also
checks the for the value in (cbMarkets). So if I entered "90210" into
tbZipCode and "C" into (cbMarkets) I want it to return the the rep info from
the line in the worksheet which has both 90210 as a zip code and the column
for "C" with a check in it. Here is my code currently and as I said it works
for finding the zip code. Thanks for any help I can get, I realize this is
maybe a little confusing but I tried to give as much detail as I possibly can
but only put the code in for two of the textboxes as the rest is basically
the same.

Private Sub cbFindButton_Click()
'Find Rep Info
tbRepNumber.Value =
Sheet1.Columns(1).Find(Val(tbZipCode.Value)).Offse t(0, 1).Value
tbRepName.Value = Sheet1.Columns(1).Find(Val(tbZipCode.Value)).Offse t(0,
2).Value
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
Removing text in combo with anther FIND function Brenda Excel Worksheet Functions 4 January 18th 10 06:36 PM
How to find/edit combo box source? Gdareos[_2_] New Users to Excel 3 December 20th 08 12:31 PM
Can't find the properties in a Combo Box tbmarlie Excel Discussion (Misc queries) 2 August 27th 07 07:34 PM
find-record combo box Iurie Excel Programming 1 September 18th 06 03:51 PM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes DoctorG Excel Programming 3 February 23rd 06 12:15 PM


All times are GMT +1. The time now is 07:44 PM.

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"