+ Reply to Thread
Results 1 to 7 of 7

Referencing

  1. #1
    Paul W Smith
    Guest

    Referencing

    On a worksheet called TestA, I have a combo called 'Player1'
    (=EMBED("Forms.ComboBox.1",""))

    How do I refer to it's properties from the change event of a control on
    another page?

    i.e I want to set Player1's ListFillRange property when a combobox on
    another page changes.

    Paul Smith



  2. #2
    Chip Pearson
    Guest

    Re: Referencing

    Right click the control and choose Properties from the pop-up
    menu.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com

    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > On a worksheet called TestA, I have a combo called 'Player1'
    > (=EMBED("Forms.ComboBox.1",""))
    >
    > How do I refer to it's properties from the change event of a
    > control on
    > another page?
    >
    > i.e I want to set Player1's ListFillRange property when a
    > combobox on
    > another page changes.
    >
    > Paul Smith
    >
    >




  3. #3
    Chip Pearson
    Guest

    Re: Referencing

    I misread your question. You can reference the control at runtime
    with code like

    Worksheets(1).OLEObjects("ComboBox1").Object.AddItem "asdf"



    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > On a worksheet called TestA, I have a combo called 'Player1'
    > (=EMBED("Forms.ComboBox.1",""))
    >
    > How do I refer to it's properties from the change event of a
    > control on
    > another page?
    >
    > i.e I want to set Player1's ListFillRange property when a
    > combobox on
    > another page changes.
    >
    > Paul Smith
    >
    >




  4. #4
    Paul W Smith
    Guest

    Re: Referencing

    This is Excel programming newsgroup isn't it. I would have hoped that
    something better than this manual method which is nowhere near what I am
    looking for would be sent.

    I would like to know how to set the ListFillRange property of an embedded
    combo box, from the change event of another combo box on another worksheet.
    It is really only how to reference the control I am looking for.

    If anyone can help please do.

    Paul Smith


    "Chip Pearson" <[email protected]> wrote in message
    news:[email protected]...
    > Right click the control and choose Properties from the pop-up menu.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    > "Paul W Smith" <[email protected]> wrote in message
    > news:[email protected]...
    >> On a worksheet called TestA, I have a combo called 'Player1'
    >> (=EMBED("Forms.ComboBox.1",""))
    >>
    >> How do I refer to it's properties from the change event of a control on
    >> another page?
    >>
    >> i.e I want to set Player1's ListFillRange property when a combobox on
    >> another page changes.
    >>
    >> Paul Smith
    >>
    >>

    >
    >




  5. #5
    Chip Pearson
    Guest

    Re: Referencing

    In the code module for sheet2, use code like the following

    Private Sub ComboBox1_Change()
    Worksheets("Sheet1").OLEObjects("Combobox1").ListFillRange = _
    Worksheets("SHeet2").Range("A1:A10").Address

    End Sub


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Paul W Smith" <[email protected]> wrote in message
    news:[email protected]...
    > This is Excel programming newsgroup isn't it. I would have
    > hoped that something better than this manual method which is
    > nowhere near what I am looking for would be sent.
    >
    > I would like to know how to set the ListFillRange property of
    > an embedded combo box, from the change event of another combo
    > box on another worksheet. It is really only how to reference
    > the control I am looking for.
    >
    > If anyone can help please do.
    >
    > Paul Smith
    >
    >
    > "Chip Pearson" <[email protected]> wrote in message
    > news:[email protected]...
    >> Right click the control and choose Properties from the pop-up
    >> menu.
    >>
    >>
    >> --
    >> Cordially,
    >> Chip Pearson
    >> Microsoft MVP - Excel
    >> Pearson Software Consulting, LLC
    >> www.cpearson.com
    >>
    >> "Paul W Smith" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> On a worksheet called TestA, I have a combo called 'Player1'
    >>> (=EMBED("Forms.ComboBox.1",""))
    >>>
    >>> How do I refer to it's properties from the change event of a
    >>> control on
    >>> another page?
    >>>
    >>> i.e I want to set Player1's ListFillRange property when a
    >>> combobox on
    >>> another page changes.
    >>>
    >>> Paul Smith
    >>>
    >>>

    >>
    >>

    >
    >




  6. #6
    Tom Ogilvy
    Guest

    RE: Referencing


    worksheets("TestA").OleObjects("Player1").ListFillRange =

    --
    Regards,
    Tom Ogilvy


    "Paul W Smith" wrote:

    > On a worksheet called TestA, I have a combo called 'Player1'
    > (=EMBED("Forms.ComboBox.1",""))
    >
    > How do I refer to it's properties from the change event of a control on
    > another page?
    >
    > i.e I want to set Player1's ListFillRange property when a combobox on
    > another page changes.
    >
    > Paul Smith
    >
    >
    >


  7. #7
    Paul W Smith
    Guest

    Re: Referencing

    Thank you very much for your answer, it is what I needed. I need to
    reference the worksheets OLEObjects

    And thanks for not taking offence at my short tempered second posting - I
    was every frustrated.

    Paul Smith


    "Chip Pearson" <[email protected]> wrote in message
    news:[email protected]...
    > In the code module for sheet2, use code like the following
    >
    > Private Sub ComboBox1_Change()
    > Worksheets("Sheet1").OLEObjects("Combobox1").ListFillRange = _
    > Worksheets("SHeet2").Range("A1:A10").Address
    >
    > End Sub
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    > "Paul W Smith" <[email protected]> wrote in message
    > news:[email protected]...
    >> This is Excel programming newsgroup isn't it. I would have hoped that
    >> something better than this manual method which is nowhere near what I am
    >> looking for would be sent.
    >>
    >> I would like to know how to set the ListFillRange property of an embedded
    >> combo box, from the change event of another combo box on another
    >> worksheet. It is really only how to reference the control I am looking
    >> for.
    >>
    >> If anyone can help please do.
    >>
    >> Paul Smith
    >>
    >>
    >> "Chip Pearson" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Right click the control and choose Properties from the pop-up menu.
    >>>
    >>>
    >>> --
    >>> Cordially,
    >>> Chip Pearson
    >>> Microsoft MVP - Excel
    >>> Pearson Software Consulting, LLC
    >>> www.cpearson.com
    >>>
    >>> "Paul W Smith" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> On a worksheet called TestA, I have a combo called 'Player1'
    >>>> (=EMBED("Forms.ComboBox.1",""))
    >>>>
    >>>> How do I refer to it's properties from the change event of a control on
    >>>> another page?
    >>>>
    >>>> i.e I want to set Player1's ListFillRange property when a combobox on
    >>>> another page changes.
    >>>>
    >>>> Paul Smith
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1