some problems calling components :(

M

Marek

people for example i try to show component name,

but when i try to call a component i get error


-----------------------------
.gggg.AddItem ("1")
MsgBox .gggg.Column(0, 0)

this works done



------------------------------------
.OLEObjects.Add classtype:="forms.combobox.1"
With .OLEObjects(.OLEObjects.Count)
.Name = "gggg"
.Left = 900
With .Object
For v2 = 0 To 2
.AddItem
.Column(0, .ListCount - 1) = "111"
.Column(1, .ListCount - 1) = "222"
Next
End With
End With

MsgBox .gggg.Column(0, 0)

'object doesnt support this method or property



why when i create dynamically component, and after creation i try t
call this component i get the error ??????


but if i call created component using last statemen
 
T

Tom Ogilvy

You named the OleObject, so use that

Activesheet.OleObjects("gggg").Object.AddItem "1"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top