setting combobox style using vba
Dave / Nick,
Many thanks for your input, all appears to be working fine subject to
more extensive testing.
Heres the code l have used:
Sub setlinkedcell()
Dim ole As OLEObject
Dim RowNo As Long
RowNo = 10
For Each ole In ActiveSheet.OLEObjects
If TypeOf ole.Object Is MSForms.ComboBox Then
If ole.Name Like "ComboBox*" Then
ole.Object.LinkedCell = "H" & RowNo
ole.Object.MatchEntry = fmMatchEntryNone
ole.Object.Style = fmStyleDropDownList
ole.Object.MatchRequired = True
RowNo = RowNo + 1
End If
End If
Next
End Sub
Once again many thanks
|