View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Adding hints to my vb functions

On Sat, 07 Mar 2009 13:23:33 -0600, Dave Peterson
wrote:

Have you tried adding:

On error resume next
'your code
on error goto 0

Yeah, that should just suppress the error message. But I seem to recall it
worked for me a longgggggg time ago.


I set up code like this:

In my add-in workbook:

Private Sub Workbook_Open()
On Error Resume Next
Assign
On Error GoTo 0
End Sub

and in a regular module:

-------------------
Option Explicit
Sub Assign()
With Application
.MacroOptions Macro:="RECount", _
Description:="Count of substrings matching Regex", _
Category:="Regular Expressions"
.MacroOptions Macro:="Enable", Description:="Re-Enable Events"
End With
End Sub
=====================

There was no error message.
The "Enable" macro picked up its description.
The RECount UDF neither picked up its description nor category.

So although that technique seemed to work for the Macro, it did not work for
the UDF.
--ron