Add macros to Excel QAT 2019 (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 10:32
Joined
Sep 21, 2011
Messages
14,403
Hi all,
Just updated to Office 2019. Already regret doing so TBH. :(

I have found out how to add commands to the QA toolbar in Excel, (same as in 2007), however a good few are not presented, so as to be able to add them?
I have a Personal.xlsb with commands I can use anywhere. One is a macro called BackupFile which will back up the current workbook.

However that is not shown?, Yet some are available and I have added to the QA as you can see.
How do I get to find the 'missing' macroes please?

I have also asked at



TIA

1712304450812.png


1712304467124.png
 

KitaYama

Well-known member
Local time
Today, 18:32
Joined
Jan 6, 2022
Messages
1,567
You can not add a macro that needs a parameter to ribbon. (even if they are optional)
How do you want to pass the parameter to the macro by clicking a button in ribbon?

Delete the parameters that are passed and you'll see them in the list.

Edit:
I just tested. It seems that if the parameters are variant type, you can add them to ribbon.
If you use string or other types, they can not be added to ribbon.

The following can be added to ribbon.
Sub BackupFile (Optional PStrFile)
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 10:32
Joined
Sep 21, 2011
Messages
14,403
From previous experience.
Add the macro to the ribbon,wherever.
Then amend the macro for parameters, but they have to be optional. That is mandatory.

That way it it will work from ribbon and from vba calls.
 

Users who are viewing this thread

Top Bottom