Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    238
    Thanks
    4
    Thanked 1 Time in 1 Post

    Word Ribbon Creation

    I am trying to create a ribbon using Gunter Avenius' Ribbon Creator. http://www.ribboncreator2010.de/en/

    Figuring how to create a ribbon with supplied or custom icons has been quite straightforward. The issue is with linking the buttons created to macros.

    How is demonstrated at http://www.ribboncreator2010.de/Vide...N_RunCode.html and the code below should run the required macro.

    Public Sub OnActionButton(control As IRibbonControl)
    'Callback in XML File "onAction"

    ' Callback for event button click
    ' Callback für Button Click

    Select Case control.id
    'Case "btnInfo"
    Case "btn_1"
    Call DisplayCoverDetails()
    Case Else
    MsgBox "Button """ & control.id & """ clicked" & vbCrLf & _
    "Es wurde auf Button """ & control.id & """ in Ribbon geklickt", _
    vbInformation
    End Select
    End Sub

    The problem I am having is that in the line I have highlighted in red, as soon as I save or even move the cursor away from the end, the parenthesis are stripped by the VB editor. That in turn stops the code working.

    This tool looks to be a terrific way of creating a ribbon but unless it also functions it is of no use.

    Any ideas what is wrong here or suggestions for a similar tool please?

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,652
    Thanks
    47
    Thanked 55 Times in 53 Posts
    I've never used Ribbon Creatorl. I have used the Custom UI Editor for Microsoft Office. Instructions for its use and a download link can be found at Customize the Ribbon (It doesn't take rocket science).

    I haven't used Call. Do you need parameters included between the parentheses? Would this simply be written as DisplayCoverDetails instead of Call DisplayCoverDetails? It appears you are trying to initiate a separate subroutine here. When you do that without parameters, you do not include parentheses. When you do it with parameters or passed variables, you do it with parentheses.

    Sorry, I a duffer at vba. I know enough to get some things done and be dangerous. Hope this helps anyway.

    Ribbon Creator looks interesting. I intend to look into it more.
    Last edited by Charles Kenyon; 2012-05-28 at 19:13.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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