Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default 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
|


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
|



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
|

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to see custom Ad-Ins ribbon tab in Excel 2007 + Windows 7 JoeU in Texas Excel Worksheet Functions 0 January 11th 10 07:01 PM
Assign custom number format to the ribbon Louis Wilson Excel Discussion (Misc queries) 0 June 24th 09 05:41 PM
Office 2007 Custom UI Ribbon - Syntax Check [email protected] Excel Programming 2 May 26th 07 11:38 AM
Office 2007 Custom UI Ribbon - Syntax Check [email protected] Excel Programming 0 May 25th 07 11:46 PM
Excel 2007 Ribbon Check custom buttons Alice[_7_] Excel Programming 6 April 22nd 07 01:58 PM


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"