Avatar of Stephen Byrom
Stephen Byrom
Flag for Ireland

asked on 

MS Excel 2010/2013

Hi,
I have an active X combo box on a worksheet that moves the cursor to the correct cell when the user selects an item from the list.
The problem I have is that whenever a cell is changed in any other worksheet, the code behind the combo box runs and the user is taken to the sheet with the combo box on it, even though nothing has changed in the combo box! I have tried adding "thisworkbook.sheets" etc but to no avail.

this is the simple code behind the active X combo box;

Private Sub cboCust_Change()
Dim c As Range
    For Each c In Range("A4:A500")
        If c.Value = cboCust.Value Then
            Application.Goto c, Scroll:=True
            c.select
            Exit Sub
        End If
    Next
End Sub

Any help is appreciated.
Thanks
Microsoft Excel

Avatar of undefined
Last Comment
Stephen Byrom

8/22/2022 - Mon