ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Fault on Custom Ribbon (https://www.excelbanter.com/excel-programming/404873-macro-fault-custom-ribbon.html)

Karen[_13_]

Macro Fault on Custom Ribbon
 
Hi,

I'm trying to create my first custom ribbon, using example code. I saved a
workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.

The ribbons are visible as well as the solitary test button but when the
button is activated I get the following error message:

"Cannot run the macro 'myButton_ClickHandler'. The macro may not be
available in this workbook or all macros may be disabled."

The folder is a trusted location, it is the local user XLStart folder.
I have enabled all macros

Any suggestions as to how to enable macros for a custom ribbon are welcome
:)

Karen


Ron de Bruin

Macro Fault on Custom Ribbon
 
Hi Karen

Look the sub like this in the VBA module

'Callback for customButton1 onAction
Sub Macro1(control as IRibbonControl)

End Sub



More info here
http://www.rondebruin.nl/ribbon.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Karen" wrote in message ...
Hi,

I'm trying to create my first custom ribbon, using example code. I saved a
workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.

The ribbons are visible as well as the solitary test button but when the
button is activated I get the following error message:

"Cannot run the macro 'myButton_ClickHandler'. The macro may not be
available in this workbook or all macros may be disabled."

The folder is a trusted location, it is the local user XLStart folder.
I have enabled all macros

Any suggestions as to how to enable macros for a custom ribbon are welcome
:)

Karen


Jim Rech[_2_]

Macro Fault on Custom Ribbon
 
Make sure the macro is "available". Spelled right, in the same workbook,
etc. If you're sure that you did everything right feel free to send me the
workbook. I've done a thousand ribbons; or it feels that way<g.

--
Jim
"Karen" wrote in message
...
| Hi,
|
| I'm trying to create my first custom ribbon, using example code. I saved
a
| workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.
|
| The ribbons are visible as well as the solitary test button but when the
| button is activated I get the following error message:
|
| "Cannot run the macro 'myButton_ClickHandler'. The macro may not be
| available in this workbook or all macros may be disabled."
|
| The folder is a trusted location, it is the local user XLStart folder.
| I have enabled all macros
|
| Any suggestions as to how to enable macros for a custom ribbon are welcome
| :)
|
| Karen
|



Karen[_13_]

Macro Fault on Custom Ribbon-Success!!
 
Thanks a lot, I had

Sub myButton_ClickHandler(control As IRibbonControl)
MsgBox "MyButton was clicked!"
End Sub

in ThisWorkbook and it did not work

I moved it to to the Modules folder in that workbook to Module 1(not
creative name but I'm just playing now) and it worked :)


Karen Hagerman

"Ron de Bruin" wrote in message
...
Hi Karen

Look the sub like this in the VBA module

'Callback for customButton1 onAction
Sub Macro1(control as IRibbonControl)

End Sub



More info here
http://www.rondebruin.nl/ribbon.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Karen" wrote in message
...
Hi,

I'm trying to create my first custom ribbon, using example code. I saved
a workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.

The ribbons are visible as well as the solitary test button but when the
button is activated I get the following error message:

"Cannot run the macro 'myButton_ClickHandler'. The macro may not be
available in this workbook or all macros may be disabled."

The folder is a trusted location, it is the local user XLStart folder.
I have enabled all macros

Any suggestions as to how to enable macros for a custom ribbon are welcome
:)

Karen



Karen[_13_]

Macro Fault on Custom Ribbon
 
Thank you, I very well might take you up on it. I am trying to extend the
'learning' to a real custom tab so......................who knows when I'll
be totally frustrated :)

Karen

"Jim Rech" wrote in message
...
Make sure the macro is "available". Spelled right, in the same workbook,
etc. If you're sure that you did everything right feel free to send me the
workbook. I've done a thousand ribbons; or it feels that way<g.

--
Jim
"Karen" wrote in message
...
| Hi,
|
| I'm trying to create my first custom ribbon, using example code. I saved
a
| workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.
|
| The ribbons are visible as well as the solitary test button but when the
| button is activated I get the following error message:
|
| "Cannot run the macro 'myButton_ClickHandler'. The macro may not be
| available in this workbook or all macros may be disabled."
|
| The folder is a trusted location, it is the local user XLStart folder.
| I have enabled all macros
|
| Any suggestions as to how to enable macros for a custom ribbon are welcome
| :)
|
| Karen
|


Ron de Bruin

Macro Fault on Custom Ribbon
 
who knows when I'll
be totally frustrated :)


Jim and I are always frustrated <g



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Karen" wrote in message ...
Thank you, I very well might take you up on it. I am trying to extend the
'learning' to a real custom tab so......................who knows when I'll
be totally frustrated :)

Karen

"Jim Rech" wrote in message
...
Make sure the macro is "available". Spelled right, in the same workbook,
etc. If you're sure that you did everything right feel free to send me the
workbook. I've done a thousand ribbons; or it feels that way<g.

--
Jim
"Karen" wrote in message
...
| Hi,
|
| I'm trying to create my first custom ribbon, using example code. I saved
a
| workbook as testingtoolbar.xlsm as well as testingtoolbar.xlam.
|
| The ribbons are visible as well as the solitary test button but when the
| button is activated I get the following error message:
|
| "Cannot run the macro 'myButton_ClickHandler'. The macro may not be
| available in this workbook or all macros may be disabled."
|
| The folder is a trusted location, it is the local user XLStart folder.
| I have enabled all macros
|
| Any suggestions as to how to enable macros for a custom ribbon are welcome
| :)
|
| Karen
|



All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com