Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
OE OE is offline
external usenet poster
 
Posts: 8
Default UDF categorisation

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default UDF categorisation

It worked okay for me, but I could force it if I made the function private.

--
HTH

Bob Phillips

"OE" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
OE OE is offline
external usenet poster
 
Posts: 8
Default UDF categorisation

Have tried making the function Private but to no avail. I wonder if it's a
VBA reference?

"Bob Phillips" wrote:

It worked okay for me, but I could force it if I made the function private.

--
HTH

Bob Phillips

"OE" wrote in message
...
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?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default UDF categorisation

Sorry, I meant that I can force the error if I make the function private,
that is it works okay as a public function.

--
HTH

Bob Phillips

"OE" wrote in message
...
Have tried making the function Private but to no avail. I wonder if it's a
VBA reference?

"Bob Phillips" wrote:

It worked okay for me, but I could force it if I made the function

private.

--
HTH

Bob Phillips

"OE" wrote in message
...
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?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default UDF categorisation



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?



  #6   Report Post  
Posted to microsoft.public.excel.programming
OE OE is offline
external usenet poster
 
Posts: 8
Default UDF categorisation

Have found the cause; both the categorisation sub and the UDF were in
Personal.xls which was hidden. Worked fine once unhide was invoked. Thanks to
all for your responses.

"keepITcool" wrote:



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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"