I have two activex comboboxes, combobox1 and combobox2, that I want to increment with VBA from firstvalue to lastvalue.
How can I change the value of the combobox so that I can see when it changes value from firstvalue to secondvalue to thirdvalue etc.. ??
So far I have found that they are OLEObjects. I found a bit of code that counts all ActiveX comboboxes in a worksheet.
How can I change the value of the combobox so that I can see when it changes value from firstvalue to secondvalue to thirdvalue etc.. ??
So far I have found that they are OLEObjects. I found a bit of code that counts all ActiveX comboboxes in a worksheet.
Code:
Sub try()
Dim Ws As Worksheet
Set Ws = Worksheets("Jämföra")
Count = 0
For Each OleObj In Ws.OLEObjects
If OleObj.OLEType = xlOLEControl Then
If TypeName(OleObj.Object) = "ComboBox" Then
Count = Count + 1
End If
End If
Next OleObj
MsgBox "Number of ComboBoxes :" & Count
End Sub