I have a workbook with some ActiveX comboboxes. When I have it open and open any other workbook I get "Run-time error '9'. Subscript out of range." When I debug it opens the change event for the combobox. I can't figure out what I have wrong that causes this error to come up when opening any other workbook. I'd be grateful for any tips.
Here's the code I currently have.
Here's the code I currently have.
Code:
Private Sub ComboBox2_Change()
Dim wsDFD As Worksheet
Set wsDFD = Worksheets("Dashboard Filtered Data")
If wsDFD.Range("$B$2") <> Sheets("Dashboard").ComboBox2.Value Then _
wsDFD.Range("$B$2") = Sheets("Dashboard").ComboBox2.Value
End Sub