View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
michael.beckinsale michael.beckinsale is offline
external usenet poster
 
Posts: 274
Default 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