Using add-in functions on a form
Peter,
Set a reference to the addin in the VBE (ToolsReference), as well as in
Excel, and then you can call the routine directly.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Peter" wrote in message
...
Can somebody please help me!
I wish to use the function 'WORKDAY' in a VBA routine available from the
Analysis Tool-pak Add-Ins.
I have ticked off the Analysis Toolpak and Analysis Toolpak - VBA
I have used it successfully in a cell so I am sure the format is correct.
E.G. =IF(L3 < "",WORKDAY(L3,AA3,Holiday_List),"")
The result is a date advanced by the value in cell AA3 excluding weekends
and public holidays.
Cell L3 has a date and cell AA3 has an integer number while 'Holiday_List'
has a range of dates.
Below is the code on a form where 'TBoxSDate' is a date and 'TboxDaysPt'
is
an integer number.
This is the line:
lblPayDte = Application.WorksheetFunction.WORKDAY(TBoxSDate,
TboxDaysPt,Holiday_List)
When coding the function 'WORKDAY' is not listed after WorksheetFunction
so
I realise that it is not available. Why?
When running the form and invoking the line above, it says 'Object
Required'
Are Add-in functions noy available within a form?
Peter Bircher
|