Hello,
Can someone help me figure out whats wrong with below code. Code does exactly what it shall, but still gives error on "property or method". The code creates a combobox with a listfillrange from another sheet.
Sub Object()
'
Dims1 = Range("b1").Value
'
ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, DisplayAsIcon:=False, Left:=277.5, Top:=36.5, Width:=177.5, Height:=28).Select
With Selection
.ListFillRange = "Object!" & Dims1
.LinkedCell = "$V$7"
.DropDownLines = 8
.Display3DShading = False
End With
End Sub
Can someone help me figure out whats wrong with below code. Code does exactly what it shall, but still gives error on "property or method". The code creates a combobox with a listfillrange from another sheet.
Sub Object()
'
Dims1 = Range("b1").Value
'
ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, DisplayAsIcon:=False, Left:=277.5, Top:=36.5, Width:=177.5, Height:=28).Select
With Selection
.ListFillRange = "Object!" & Dims1
.LinkedCell = "$V$7"
.DropDownLines = 8
.Display3DShading = False
End With
End Sub