View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default some problems calling components :(

You named the OleObject, so use that

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

--
Regards,
Tom Ogilvy


"Marek" wrote in message
...

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 to
call this component i get the error ??????


but if i call created component using last statement


--
Marek
------------------------------------------------------------------------
Marek's Profile:

http://www.excelforum.com/member.php...o&userid=13769
View this thread: http://www.excelforum.com/showthread...hreadid=269114