Hi. Someone help with this: I have a book with  aprox 20 sheets, many
products are included. Well i need a search a defined product from
combobox inside a userform, but when i write the first letter the
macro run and don't let me write the others. I tried to put a delay
but doesn't work. If you can help me?, Please

Private Sub ComboBox1_Change()
Dim Producto As String
Dim SheetCount As Integer
Dim counter As Integer
Dim currentSheet As Integer
Producto = ComboBox1.Value
Application.ScreenUpdating = False
On Error Resume Next
    currentSheet = ActiveSheet.Index
    For counter = 1 To 20
    Sheets(counter).Activate
    Cells.Find(What:=Producto, After:=ActiveCell, LookIn:=xlValues,
LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
        False, SearchFormat:=False).Activate
        ComboBox1.AddItem ActiveCell.Value
    Cells.FindNext(After:=ActiveCell).Activate
    ComboBox1.AddItem ActiveCell.Value
    If ComoboBox1.Value <> Producto Then
    ComboBox1.RemoveItem (ComboBox1.Value <> Producto)
    End If
Next counter

If you need more information please contact contact me
Thanks

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to