Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Thanked 1 Time in 1 Post

    Word Ribbon Creation

    I am trying to create a ribbon using Gunter Avenius' Ribbon Creator.

    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 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
    'Case "btnInfo"
    Case "btn_1"
    Call DisplayCoverDetails()
    Case Else
    MsgBox "Button """ & & """ clicked" & vbCrLf & _
    "Es wurde auf Button """ & & """ in Ribbon geklickt", _
    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. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Sun Prairie, Wisconsin, Wisconsin, USA
    Thanked 128 Times in 123 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