Reputation: 3433
I have an Excel project with a lot of macros. What I want is assign macros to buttons in the ribbons. For that I created macros like:
Sub R10_parallel_device()
help.helpON ("parallel_device ")
Call sub_novelty_claims("parallel_device")
End Sub
So the three conditions are met:
a) the macro SUB R10_parallel_device()
do not accept parameters
b) it is not private
c) It is not hide
when I go to the list of macros I see all the list of macros named Rnn but all THE BUTTONS ARE GREY OUT EXCEPTFOR CREATE.
Now if I click in that sub for instance SUB R10_parallel_device()
I can not edit it and if I click "create" excel sends me to a new created module where
Sub R10_parallel_device()
End Sub
appears.
& When I go to file/options/ribbon if I want to add that macro to a button it is listed and it is possible to assigne the macro to a button but it would not run, giving the error that such a macro is not found.
NOTE: I checked which macro are listed thisworkbook/all/ etc. note2: this did not help me. this neither
thx
Upvotes: 0
Views: 569
Reputation: 5450
Confirmed it's the macro names - go to Developer -> View Code (or type Alt + f11), then select the module with your code in it and rename them. For whatever reason it's that R#
syntax:
Upvotes: 2