Results 1 to 5 of 5

Displaying custom ribbon image using callback

Threaded View

  1. #1
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,079

    Displaying custom ribbon image using callback

    I have this ribbon callback to deterimine the image of a button. As shown it's using the inbuild mso images, which works.

    Sub GetButtonImage(control As IRibbonControl, ByRef returnedVal)
        If a = b Then
            returnedVal = "Info"  
        Else
            returnedVal = "AnimationOnclick" 
        End If
    End Sub
    However, instead of using an mso image I want to use a custom image called "MyImage" that I've added to the XML.
    I've tested that MyImage works when hard-coded into the XML, but when trying to set returnedVal = "MyImage" no picture shows.

    So in this example, if a = b then no image is shown when it should show the custom image.
    Sub GetButtonImage(control As IRibbonControl, ByRef returnedVal)
        If a = b Then
            returnedVal = "MyImage"  
        Else
            returnedVal = "AnimationOnclick" 
        End If
    End Sub
    Last edited by ByteMarks; 04-25-2025 at 06:17 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 'Invalid image error :481' when displaying 7 charts or more as image
    By djemy1975* in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2018, 02:26 AM
  2. Put VBA ribbon together with Custom UI Editor Ribbon
    By czarlando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2016, 05:46 AM
  3. Assistance with Custom Tab and Groups on Excel Office Ribbon using Custom UI Editor.
    By sdavison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2015, 06:13 AM
  4. [SOLVED] An alternative to the Add-Ins ribbon tab - Global Custom Ribbon Tab by Ken Puls
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 10:01 PM
  5. [SOLVED] Callback for Ribbon drop down
    By icyrius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2013, 04:28 PM
  6. Displaying and Updating Image Dynamically (ActiveX Image Control?)
    By VTHokie11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2011, 10:57 AM
  7. [SOLVED] Hyperlink to an image in other worksheet, displaying entire image.
    By twilliams in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2006, 06:10 PM

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