I have tried this before, If I run the Auto_Open in a standard module within
the add-in, I get the error message "Cannot edit a macro on a hidden
workbook. Unhide the workbook using the Unhide command"
What I am trying to run is a series of statements as follows:
Application.MacroOptions Macro:="CCRED08", _
Description:="Calculates the allowable amount of the child care
credit for the year 2008.", _
Category:="Tax Functions"
They work fine, just not from the add-in. I could run it from personal.xls
on my computer, but that does no good when we move the add-in around.
I know it is possible, because it has been done before, seems like I can't
find the correct event handler.
Jack
"Matthew Pfluger" <(E-Mail Removed)> wrote in
message news:BCF52A69-A3A2-43F7-901A-(E-Mail Removed)...
> Have you tried using an Auto_Open routine? Put this code in a STANDARD
> code
> module:
> Sub Auto_Open()
> ' Call Subroutine Here
> End Sub
>
> Similarly:
> Sub Auto_Close()
> ' Call Subroutine Here
> End Sub
>
> This should be called on opening or closing the workbook.
> Matthew Pfluger
>
>
> "Jack" wrote:
>
>> I have an add-in full of custom functions.
>>
>> I also have a routine that assigns these functions to specific categories
>> to
>> be used in the insert function dialog box.
>>
>> How can I get this routine to run automatically when excel is opened.
>> The
>> routine runs fine if I execute it manually. But I have tried various
>> event
>> handlers within the add-in, but it never runs automatically. I have
>> accomplished this in the past, but I can't get it to work anymore.
>>
>> Jack
>>
>>
>>
|