Consulting

Results 1 to 4 of 4

Thread: Solved: RibbonX - Label update

  1. #1

    Solved: RibbonX - Label update

    I'm really strugling with this one...

    I'm trying to create a spreadsheet that has a custom control in the ribbon. This contol will be an EditBox. I would like the label for this control to be dynamic. The label will be fed from a cell on my Excel spreadsheet.

    How do I "trigger" the label to update? I would like to put code in my Worksheet_Change event that will update the label. How do I call a Ribbon event from VBA?

    I hope this make sense.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You can't from VBA. You can use callback code to set the label, but that callback is invoked when the ribbon starts up. You cannot change it from some Excel event I am afraid.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    If I understand what you want to do, I usually .Invalidate the control from VBA

    That will cause the Ribbon control to 're-initialize' itself and pick up any status, etc. changes

    Paul

  4. #4
    The Invalidate did the trick. Thank you very much.

Posting Permissions

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