erik.van.geit
MrExcel MVP
- Joined
- Feb 1, 2003
- Messages
- 17,832
Hi, gurus,
strange problem
this is working fine
but this not
error 438 "property or method not supported by this object
why ???
to tell this in words:
creating a combobox works fine with this code
setting its listfillrange:
1. afterwards (using a macro even called 0.01 second later) = working fine
2. within the same macro it doesn't work
kind regards,
Erik
strange problem

this is working fine
Code:
Sub create_combobox()
ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=ActiveCell.Left, Top:=ActiveCell.Top, _
Width:=ActiveCell.Width, Height:=ActiveCell.Height).Name = "test"
Application.OnTime Now + 0.01 / 60 / 60 / 24, "fillit"
End Sub
Sub fillit()
ActiveSheet.test.List() = Array("date1", "date2", "date3")
End Sub
Code:
Sub create_combobox()
ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=ActiveCell.Left, Top:=ActiveCell.Top, _
Width:=ActiveCell.Width, Height:=ActiveCell.Height).Name = "test"
ActiveSheet.test.List() = Array("date1", "date2", "date3")
End Sub
why ???
to tell this in words:
creating a combobox works fine with this code
setting its listfillrange:
1. afterwards (using a macro even called 0.01 second later) = working fine
2. within the same macro it doesn't work
kind regards,
Erik