the macro name needs to be found..
no problems if the UDF is public, the module is public the workbook is
active etc..
if you cant guarantee that then..
following will explicitly describe where the macro can be found.
and will work regardless
Although i wouldnt put my UDFs in an object module :)
Sub foo()
Application.MacroOptions Category:=3, _
Macro:=ThisWorkbook.VBProject.Name & ".module1.myudf"
Application.MacroOptions Category:=3, _
Macro:=ThisWorkbook.VBProject.Name & ".sheet1.myudfsheet"
End Sub
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
OE wrote :
In previous versions of Excel, I could categorise UDFs using;
Application.MacroOptions Macro:="myUDF", Category:=2
(for Date & Time functions)
but now I get an error :
Method 'MacroOptions' of object '_Application' failed. [note the
leading underscore].
This is as used for quite sometime & appears in Help of Excel 2002 &
XP. Any clues?