Call a Form from an addin

ericontheroad

New Member
Joined
Mar 7, 2009
Messages
4
Hi
Note that I tested the below in a Workbook then recreated the code in a xla workbook. It worked in a regular workbook but the call path errors out in the xla.

In a regular workbook, I had a sub macro simply calling the form.
Code:
Sub MyMacro1()
    FmMkeffect.Show
End Sub
I saved this same sub in the xla module but the path doesn't seem to be recognized. Is there something to be added because it's now a xla workbook?

My addin is creating a Menu bar in excel. My target was to call Sub MyMacro1 from the menu bar and call the form that way.
Thansk
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Presuming you have the xla installed, how are you calling the procedure 'MyMacro1'?
 
Upvote 0
Oops. Critters musta hit the Post Reply button when I wasn't lookin'.

The below presumes an .xla filename of 'Temp.xla' and that the procedure 'MyMacro1' is in 'Module1'.

Code:
Sub CallIt()
    
    Application.Run "Temp.xla!Module1.MyMacro1"
        
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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