Exel Custom UI Expand all groups

Serafin54

Board Regular
Joined
Apr 11, 2014
Messages
165
Office Version
  1. 2016
Platform
  1. Windows
Hello all,

I am getting into Custom UI with adding a "toolbox" type tab with several different macro codes to help tedious tasks. The problem is, in the code below, all icons show fine until it gets to the MISC group then the entire grouping is collapsed. Is there a way to add a scroll feature to my code to keep all groups expanded and allow scrolling or even a way to create sub menus for certain like objects like my Pivot Table group or the items in Button 18-20 like when using Excels Insert, Delete or Format buttons on the Home tab?

Thanks!

VBA Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
        <tabs>
            <tab id="VBA_Toolbox_2" label="VBA Toolbox 2.0" insertBeforeMso="TabInsert">
                <group id="Formatting" label="Formatting">
                    <button id="customButton1" label="Clean and Trim" size="normal" screentip="Cleans non printing characters and trims extra spaces from range" onAction="FORMATTING_Clean_and_Trim" imageMso="Cut" />
                    <button id="customButton2" label="Proper Case" size="normal" screentip="Changes all words to proper case in a range" onAction="FORMATTING_Proper_Case" imageMso="ChangeCaseDialogClassic" />
                    <button id="customButton3" label="Formulas to Values" size="normal" screentip="Will change all formulas in active workbook to values" onAction="FORMATTING_Formulas_to_Values" imageMso="MacroPlay" />
                    <button id="customButton4" label="Lower Case" size="normal" screentip="Changes all letters to lowercase in a range" onAction="FORMATTING_Lower_Case" imageMso="FontSizeDecrease" />
                    <button id="customButton5" label="Format Phone Numbers" size="normal" screentip="Removes hyphens, parenthesis and spaces from range" onAction="FORMATTING_Format_Phone_Numbers" imageMso="AutoDial" />
                    <button id="customButton6" label="Upper Case" size="normal" screentip="Changes all letters to uppercase in a range" onAction="FORMATTING_Upper_Case" imageMso="FontSizeIncrease" />
                    <button id="customButton7" label="Length 30" size="normal" screentip="Highlights cells yellow in a selected range that are more than 30 characters in length" onAction="FORMATTING_Length_30" imageMso="ColumnWidth" />
                </group>
                <group id="Deleting" label="Deleting">
                    <button id="customButton8" label="Delete Blank Columns" size="normal" screentip="Deletes columns with no values other than header." onAction="DELETING_Delete_Blank_Columns" imageMso="FieldList" />
                    <button id="customButton9" label="Delete Inactive Sheets" size="normal" screentip="Deletes all sheets in active workbook other than active sheet" onAction="DELETING_Delete_Inactive_Sheets" imageMso="RecordsDeleteRecord" />
                    <button id="customButton10" label="Remove Hyphens" size="normal" screentip="Removes hyphens from range but keeps leading zeros" onAction="DELETING_Remove_Hyphens" imageMso="ControlSpecialEffectChiseled" />
                    <button id="customButton11" label="Remove Letters" size="normal" screentip="Removes all letters from a range" onAction="DELETING_Remove_Letters" imageMso="SortRemoveAllSorts" />
                    <button id="customButton12" label="Remove Line Break" size="normal" screentip="Changes line breaks to pipes in a range" onAction="DELETING_Remove_Line_Break" imageMso="ColumnsDialog" />
                    <button id="customButton13" label="Remove Numbers" size="normal" screentip="Removes all numbers from a range" onAction="DELETING_Remove_Numbers" imageMso="FormattingUnique" />
                    <button id="customButton14" label="Remove Special Characters" size="normal" screentip="Removes special characters from range" onAction="DELETING_Remove_Special_Characters" imageMso="CommaStyle" />
                </group>
                <group id="Pivot" label="Pivot">
                    <button id="customButton15" label="Remaining to Values" size="normal" screentip="Adds all remaining pivot fields to values" onAction="PIVOT_Remaining_to_Values" imageMso="TableSummarizeWithPivot" />
                    <button id="customButton16" label="Values to Sum" size="normal" screentip="Changes all values to sum" onAction="PIVOT_Values_to_Sum" imageMso="TableSummarizeWithPivot" />
                    <button id="customButton17" label="Remove All Values" size="normal" screentip="Removes all fields from values" onAction="PIVOT_Remove_All_Values" imageMso="TableSummarizeWithPivot" />
                </group>
                <group id="EWH" label="EWH">
                    <button id="customButton18" label="ERN | and Hours to Range" size="normal" screentip="Adds ERN | and Hours to range" onAction="EWH_Add_ERN_and_Hours_to_name" imageMso="StartAfterPrevious" />
                    <button id="customButton19" label="ERN | only to Range" size="normal" screentip="Adds ERN | only to range" onAction="EWH_Add_ERN_to_name" imageMso="AccountingFormat" />
                    <button id="customButton20" label="DED | Only to Range" size="normal" screentip="Adds DED | to range" onAction="EWH_Add_DED_to_name" imageMso="VisibilityHidden" />
                    <button id="customButton21" label="Time Period PPP" size="normal" screentip="Adds PPP Time Period next to selected Check Date column. Header must say Check Date" onAction="EWH_Time_Period_PPP" imageMso="AccessTableEvents" />
                    <button id="customButton22" label="Reverse Amounts" size="normal" screentip="Will reverse all amounts in a range making positive numbers negative and negative numbers positive" onAction="EWH_Reverse_Amounts" imageMso="Undo" />
                    <button id="customButton23" label="Combine Duplicate Headers" size="normal" screentip="Sums all exact duplicate header columns into one column and removes duplicates" onAction="EWH_Combine_Duplicate_Headers" imageMso="TableRepeatHeaderRows" />
                    <button id="customButton24" label="Calc and Save Warnings" size="normal" screentip="Converts calc and save information. Currently only converts warnings" onAction="EWH_Calc_and_Save_Warnings" imageMso="Calculator" />
                </group>
                <group id="Misc" label="Misc">
                    <button id="customButton27" label="Consolidate Files" size="normal" screentip="Consolidates multiple files and/or sheets into one stacked sheet" onAction="MISC_Consolidate_Files" imageMso="Consolidate" />
                    <button id="customButton28" label="Insert Row at Value Change" size="normal" screentip="Inserts blank row at change in selected column" onAction="MISC_InsertRowsAtValueChange" imageMso="CellsInsertDialog" />
                    <button id="customButton29" label="Round Range" size="normal" screentip="Rounds range of numbers to entered decimal place" onAction="MISC_Round_Range" imageMso="RecurrenceEdit" />
                    <button id="customButton30" label="Sheets from Files" size="normal" screentip="Creates individual sheets in current workbook from multiple files" onAction="MISC_Sheets_from_Files" imageMso="ShowFormRegionPage" />
                    <button id="customButton31" label="Sort Sheets" size="normal" screentip="Sorts sheets alphabetically or numerically" onAction="MISC_Sort_Sheets" imageMso="TextEffectTracking" />
                    <button id="customButton32" label="Split to Sheets" size="normal" screentip="Splits current sheet into multiple sheets based on change in seleted column" onAction="MISC_Split_to_Sheets" imageMso="ReplicationOptionsMenu" />
                    <button id="customButton33" label="Split Sheets to Files" size="normal" screentip="Splits workbook into separate files using tab names as file names" onAction="MISC_Split_Sheets_to_Files" imageMso="OutlineUngroup" />
                    <button id="customButton34" label="Find Replace Sheet Names" size="normal" screentip="Performs a find and replace within all the tab names in the workbook" onAction="MISC_Find_Replace_Sheet_Names" imageMso="FindNext" />
                    <button id="customButton36" label="Highlight Duplicates" size="normal" screentip="Select columns all adjacent to one another (cannot skip columns) then run tool. Will highlight in yellow all rows that have duplicate values in each cell in that row. Can be reran and will update the highlights for that new search only." onAction="MISC_Highlight_Duplicates" imageMso="RelationshipsEditRelationships" />
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top