
Rebuild select list for combo/list box
Peter;
Thank you for your help and patience. I sort of thought
that I was entering the realm of the impossible when I
started this project. I'll just have to figure another
way.
Thanks again,
Joe Gabay
Quote:
>-----Original Message-----
>Hi Joe
>What you're trying to do does not make sense! The problem
is that the ActiveX
Quote:
>ComboBox control does not have persistent values (no
ActiveX controls do)!
Quote:
>When an ActiveX control is placed on a UserForm (a form
built in the VBA IDE)
Quote:
>the control is normally initialised in the Forms
UserForm_Initialize event.
Quote:
>When an ActiveX control is placed on a document the
control is normally
Quote:
>initialised in the documents Document_New or
Document_Open event.
Quote:
>But wait - it gets even worse :(. Although it's possible
to active and work
>with the embedded document none of it's event handlers
are going to work
>(these are the procedures that respond to ComboBox
selection, CheckBox clicks
Quote:
>etc.) because there is already code running - your code
that just activated
Quote:
>the embedded document. You could possibly kludge around
it by activating the
Quote:
>embedded document and then having your code run the
documents Document_New or
Quote:
>Document_Open procedure to initialise the documents
controls. You would then
Quote:
>have to terminate your macro so the embedded documents
event handling
>procedures would work. At this stage the user is manually
ineracting with the
Quote:
>document. You've then got the problem of how do you get
programatic control
Quote:
>back. Essentially this can't happen unless the users
somehow starts more of
Quote:
>your code.
>Only the FormField Dropdown field has persistent values,
but is limited to a
Quote:
>maximum of 20 values.
>I hope the above is helpful even if it's not what you
wanted to hear!
>Cheers - Peter
Quote:
>> Peter;
>> Thank you very much for your assistance, it turned out
to
>> be quite helpful. If I may impose upon you once more,
I
>> am trying to load this items with a second programs
which
>> opens the original document and then follows down the
>> inlineshapes list.
>> i.e.
>> With objWordDoc
>> For i = 1 To .InlineShapes.Count
>> Debug.Print .InlineShapes.Item(i)
>> .OLEFormat.ClassType
>> Debug.Print .InlineShapes.Item(i)
>> .OLEFormat.object.Name,
>> Debug.Print .InlineShapes.Item(i)
>> .OLEFormat.object.Value
>> Next
>> End With
>> When I get to the item I am looking for, in this case
>> combo boxes, how do I clear and reload their select
lists?
>> You really don't have to send me code samples, just
point
>> me in the right direction.
>> TIA
>> Joe Gabay
>.