Custom Ribbon UI

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Custom Ribbon UI

  1. #1
    Board Regular
    Join Date
    Apr 2011
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Board Regular
    Join Date
    Apr 2011
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

User Tag List

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