Results 1 to 8 of 8

Custom Ribbon UI

This is a discussion on Custom Ribbon UI within the Easy-XL Add-In forums, part of the MrExcel Products category; Hi, I have around 25 macro's written in different excel files, I want to add a tab in the Excel-Ribbon ...

  1. #1
    Board Regular
    Join Date
    Apr 2011
    Posts
    56

    Default Custom Ribbon UI

    Hi,

    I have around 25 macro's written in different excel files,
    I want to add a tab in the Excel-Ribbon and link my macro's there.
    Can you help me...

  2. #2
    New Member
    Join Date
    Mar 2012
    Location
    Pune
    Posts
    27

    Default Re: Custom Ribbon UI

    Hi,

    You can try this-:

    1.Consolidate all macros in one workbook.
    2.Save workbook as Excel - Addins
    3.You can add a tab through Office 2007 Custome UI Editor
    4. Create groups and buttons in that tab.
    5.Assign sub procedures to buttons created in tab.

  3. #3
    Board Regular
    Join Date
    Apr 2011
    Posts
    56

    Default Re: Custom Ribbon UI

    Hi,
    Thank you very much for your response, could you please explain me the step.3-add a tab through Office 2007 Custome UI Editor.

  4. #4
    New Member
    Join Date
    Mar 2012
    Location
    Pune
    Posts
    27

  5. #5
    Board Regular
    Join Date
    Apr 2011
    Posts
    56

    Default Re: Custom Ribbon UI

    Hi,

    Thank you first of all, sorry to bother you again & again.
    I have followed all the steps successfully finally i got a button in Excel-file menu with name 'Book 1', but i need a new tap where i can assign the buttons that i required. plz

  6. #6
    New Member
    Join Date
    Aug 2012
    Posts
    9

    Default Re: Custom Ribbon UI

    Hi,

    I am using this to add macros to the ribbon, try it out, maybe it will fit

    Code:
    Private Sub CommandButton1_Click()
    Dim NewButton As CommandBarButton
    
    On Error GoTo Nocommandbar
    
    Set NewButton = Application.CommandBars("Reporting").Controls.Add
    On Error GoTo 0
    With NewButton
    
    .Caption = "Statement" 
    
    .Style = msoButtonIconAndCaption
    .FaceId = 1763 'Custom button, loog google for what id is what logo
    .OnAction = "x://GSAPStatementMacro.xls'!GSAPstatement" 'Refers to the excel file with the macro name
    End With
    GoTo Exitline
    Nocommandbar:
    Application.CommandBars.Add(Name:="Reporting").Visible = True
    Set NewButton = Application.CommandBars("Reporting").Controls.Add
    Resume Next
    Exitline:
    Application.CommandBars("Reporting").Visible = True
    End Sub
    See it in action here:
    http://s9.postimage.org/6xzzhtc67/Capture.jpg
    Last edited by w1ckd; Aug 30th, 2012 at 01:58 PM.

  7. #7
    New Member
    Join Date
    Jun 2013
    Posts
    1

    Default Re: Custom Ribbon UI

    Quote Originally Posted by w1ckd View Post
    Hi,

    I am using this to add macros to the ribbon, try it out, maybe it will fit

    Code:
    Private Sub CommandButton1_Click()
    Dim NewButton As CommandBarButton
    
    On Error GoTo Nocommandbar
    
    Set NewButton = Application.CommandBars("Reporting").Controls.Add
    On Error GoTo 0
    With NewButton
    
    .Caption = "Statement" 
    
    .Style = msoButtonIconAndCaption
    .FaceId = 1763 'Custom button, loog google for what id is what logo
    .OnAction = "x://GSAPStatementMacro.xls'!GSAPstatement" 'Refers to the excel file with the macro name
    End With
    GoTo Exitline
    Nocommandbar:
    Application.CommandBars.Add(Name:="Reporting").Visible = True
    Set NewButton = Application.CommandBars("Reporting").Controls.Add
    Resume Next
    Exitline:
    Application.CommandBars("Reporting").Visible = True
    End Sub
    See it in action here:
    http://s9.postimage.org/6xzzhtc67/Capture.jpg

    this works wonders for me! thanks for sharing w1ckd, you are not that wicked after all.

  8. #8
    New Member
    Join Date
    Jun 2010
    Posts
    2

    Default Custom Ribbon UI

    Is it possible to somehow add a specific autotext or quick parts category to a menu or gallery on a custom ribbon using the Custom UI Editor so I can see only the entries in that category? Thanks Cheryl

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com