Solved

Would it be possible to write a macro to document all Excel 2016 menu commands?

Posted on 2016-08-26
11
40 Views
Last Modified: 2016-09-07
Going through the Quick Access Toolbar and Customize Ribbon choices in Excel 2016, I have determined that there are over a thousand menu commands. While there are shortcuts given in different places and some of the menu commands are documented, there are only a few dozen menu commands documented.  
Is there a way to write a macro to document all the menu commands?
The result would be something like this:
Alt+H,X;Cut
Alt+H,C;Copy
Alt+H,P;Copy as Picture
0
Comment
Question by:Alex972
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
11 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41771572
I am not suggesting I can do this but I assume you would also want to include the Ctrl + key combinations:

Ctrl + X = Cut
Ctrl + C = Copy
Ctrl + Z = Undo
etc, etc

I suggest you research MS Excel resource pages on Microsoft.com there might already be the documentation.

For starters: https://support.office.com/en-us/article/Excel-keyboard-shortcuts-and-function-keys-1798d9d5-842a-42b8-9c99-9b7213f0040f
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41771650
keep in mind that sometimes the shortcut keys can be altered/customized by the user
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41771655
there is an add in that can list all shortcut keys assigned to your macros
http://excel.tips.net/T003162_List_of_Macro_Shortcuts_in_All_Open_Workbooks.html

also this routine will list those shortcuts that were assigned using the Macro Dialog box on the Excel worksheet. It will NOT list shortcut keys that were assigned using the Application.OnKey method.
Option Explicit
'MUST set to Trust Access to the VBA Project Object Model
'  in Excel Options
'Set reference to:
'Microsoft Visual Basic for Applications Extensibility
'Microsoft Scripting Runtime
'Microsoft VBScript Regular Expressions 5.5
Sub MacroShortCutKeys()
    Dim VBProj As VBIDE.VBProject
    Dim VBComp As VBIDE.VBComponent
    Dim CodeMod As CodeModule
    Dim LineNum As Long
    Dim ProcKind As VBIDE.vbext_ProcKind
    Dim sProcName As String, sShortCutKey As String
    Const FN As String = "C:\Temp\Temp.txt"
    Dim S As String
    Dim FSO As FileSystemObject
    Dim TS As TextStream
    Dim RE As RegExp, MC As MatchCollection, M As Match

Set RE = New RegExp
With RE
    .Global = True
    .IgnoreCase = True
    .Pattern = "Attribute\s+(\w+)\.VB_ProcData\.VB_Invoke_Func = ""(\S+)(?=\\)"
End With

Set FSO = New FileSystemObject
Set VBProj = ActiveWorkbook.VBProject
For Each VBComp In VBProj.VBComponents
    Select Case VBComp.Type
        Case Is = vbext_ct_StdModule
            VBComp.Export FN
            Set TS = FSO.OpenTextFile(FN, ForReading, Format:=TristateFalse)
            S = TS.ReadAll
            TS.Close
            FSO.DeleteFile (FN)
            If RE.Test(S) = True Then
                Set MC = RE.Execute(S)
                For Each M In MC
                    Debug.Print VBComp.Name, M.SubMatches(0), M.SubMatches(1)
                Next M
            End If
    End Select
Next VBComp
End Sub

Open in new window

0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 18

Expert Comment

by:xtermie
ID: 41771673
Also you can create a LIST of all shortcuts by using the following method (word 2013)
  1. Click the “File” tab
  2. On the backstage screen, click “Print” in the list of options on the left
  3. On the “Print” screen, click on the first drop-down list under “Settings.” It’s most likely labeled with the first option available (“Print All Pages”), unless you’ve selected a different option while Word has been open
  4. Scroll down under the “Document Info” section of the popup menu and select “Key Assignments.”
  5. Select a printer from the “Printer” drop-down list, or select a PDF printer, such as Foxit Reader PDF Printer, if you want to print to a PDF file
  6. Click “Print” to print your list of key assignments
  7. If you chose to print to a PDF file, enter a name for the file and select a location for the file. Click “Save.”
NOTE: This method only generates key assignments that have been reassigned from their defaults in the current document and template.
0
 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 41771717
@Alex972

what you are asking do not exist.

here is an example to clarify.  the option of using ALT + other navigation varies machine to machine.

for example if you have addtional customized ribbon, when you press ALT key the Excel software automatically assign further keys depending on the ribbon and they are visually shown.

for example if you have an Add-in, you would never find anywhere in internet what ALT+ key Excel it will assign to it. however for the built-in Ribbons like Home tab, Insert etc, there is a complete list of all Excel keyboard shortcut keys that indicate by pressing what, what triggers. here is the list

https://www.shortcutworld.com/en/win/Excel_2016.html
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41771743
Just thought as well, for the navigation shortcuts, it depends on whether the user has changed the setting for Lotus Compatibility and Transition Navigation keys.

This swaps some of the settings, standard setting for Home takes the cursor to the far left of the active row and Ctrl + Home goes to top left (A1 or top left of frozen pane). I have this option ticked and have the reverse effect, Home goes to top left and Ctrl + Home goes to the left.

It also affects range selection. Standard navigation selecting a cell and then doing for example Shift End Right and Shift End Down selects the data to the extent of the original active column whereas activating this takes you to the bottom of the final active column.
0
 
LVL 1

Accepted Solution

by:
Alex972 earned 0 total points
ID: 41776892
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41777183
Other contributions also provided valid links and information.
0
 
LVL 1

Author Comment

by:Alex972
ID: 41777415
Attached is a spreadsheet with menu commands and shortcuts.
Description      #      URL
Excel 2007 Shortcut Database      453      http://www.veodin.com/keyrocket/excel-2007-shortcuts/
Excel 2010 Shortcut Database      507      http://www.veodin.com/keyrocket/excel-2010-shortcuts/
Excel 2013 Shortcut Database      589      http://www.veodin.com/keyrocket/excel-2013-shortcuts/
Outlook 2007 Shortcut Database      172      http://www.veodin.com/keyrocket/outlook-2007-shortcuts/
Outlook 2010 Shortcut Database      383      http://www.veodin.com/keyrocket/outlook-2010-shortcuts/
Outlook 2013 Shortcut Database      276      http://www.veodin.com/keyrocket/outlook-2013-shortcuts/
Powerpoint 2007 Shortcut Database      273      http://www.veodin.com/keyrocket/powerpoint-2007-shortcuts/
Powerpoint 2010 Shortcut Database      332      http://www.veodin.com/keyrocket/powerpoint-2010-shortcuts/
Powerpoint 2013 Shortcut Database      379      http://www.veodin.com/keyrocket/powerpoint-2013-shortcuts/
Windows 7 Explorer Shortcut Database      60      http://www.veodin.com/keyrocket/windows-shortcuts/windows-7-explorer-shortcuts/
Windows 8 Explorer Shortcut Database      87      http://www.veodin.com/keyrocket/windows-shortcuts/windows-8-explorer-shortcuts/
Windows Vista Explorer Shortcut Database      60      http://www.veodin.com/keyrocket/windows-shortcuts/windows-vista-explorer-shortcuts/
Windows XP Explorer Shortcut Database      60      http://www.veodin.com/keyrocket/windows-shortcuts/windows-xp-explorer-shortcuts/
Word 2007 Shortcut Database      548      http://www.veodin.com/keyrocket/word-2007-shortcuts/
Word 2010 Shortcut Database      581      http://www.veodin.com/keyrocket/word-2010-shortcuts/
Word 2013 Shortcut Database      298      http://www.veodin.com/keyrocket/word-2013-shortcuts/
CombinedMenus-Shortcuts.xls.xlsx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question