Add In to Call UserForm

Jaime123

New Member
Joined
Dec 29, 2011
Messages
17
Hi there,

I'm having some trouble with an Add-in which calls a UserForm. When selecting the Add-in, I receive the following error: "Cannot run the macro "DATA CHECKER ADD IN.xlam'!Run_ShowUserForm'. The macro may not be available in this workbook or all macros may be disabled.

Below is my code:

Sub Workbook_Open()

On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("Grapher+").Delete
Set cControl = Application.CommandBars("Worksheet Menu Bar").Controls.Add
With cControl
.Caption = "Data Checker"
.Style = msoButtonCaption
.OnAction = "Run_ShowUserForm" 'Macro stored in a Standard Module
End With
On Error GoTo 0
End Sub

Sub Workbook_Close()
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("Data Checker").Delete
On Error GoTo 0
End Sub

Sub ShowUserForm()
Formula_Selection.Show
End Sub

I've tried adding the ShowUserForm macro in a module and in "ThisWorkbook" but neither works.

Thanks for your help!

Jaime
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,207,091
Messages
6,076,522
Members
446,212
Latest member
KJAYPAL200

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top