accessing a sub through the macro option (Alt-F8(

  • Thread starter Thread starter Harry
  • Start date Start date
H

Harry

Hi:

i've defined a public sub in an class file i've imported into the
workbook . However, I can't see it when I hit alt-f8.

I am looking to add a button to the work book toolbar through the menu
option and connect it to the macro: hence when I click the button on
the toolbar I want to run the macro.


HELP!

thanks.
Harry
 
You can't directly call a Public Sub that you have created in a class - you
will have to do it in a regular module.

In a regular module, declare a new instance of the class, then call the sub
using that instance.

--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"
 
Back
Top