Ron,
Re: "Category:="Regular Expressions""
Since you are trying to create a new category for your function, I believe
the following notes I saved with one my own early add-ins apply...
'--------------
0 = All 11 = Customizing
1 = Financial 12 = Macro Control
2 = Date & Time 13 = DDE/External
3 = Math & Trig 14 = User Defined
4 = Statistical 15 = Engineering
5 = Lookup & Reference
6 = Database
7 = Text
8 = Logical
9 = Information
10 = Commands
'--------------
XL2000: How to Add a New Category to Function Category List
Article ID : 213813
To manually create a custom category for a user-defined function that you write
in Microsoft Visual Basic for Applications, you must insert a
Microsoft Excel 4.0 macro sheet before you create the category.
To create a custom category, follow these steps:
1. In Microsoft Excel 2000, right-click a sheet tab in the workbook and then click Insert.
2. Click MS Excel 4.0 Macro, and then click OK to add a macro sheet to the workbook.
3. On the Insert menu, point to Name, and then click Define. Under Macro, click Function.
4. In the Name box, type TEST1.
5. In the Category box, replace User Defined with the new category name, and then click OK.
Microsoft Excel adds the new category to the list.
After you add one or more custom functions to the new category,
you can delete the "TEST1" function name. When you do this, the new category remains.
If you delete the Microsoft Excel 4.0 macro sheet,
functions already assigned to the custom category remain in that category; however,
you cannot assign a new function to that category after you delete the macro sheet.
APPLIES TO Microsoft Excel 2000 Standard Edition
'--
I also have a post from Jerry Lewis in 2006 that I kept...
"Categories 0-10 are standard and stable, but subsequent categories are added
by various applications/add-ins and will vary (both the names and the order
in which they occur) from PC to PC."
--
Jim Cone
Portland, Oregon USA
"Ron Rosenfeld" <
[email protected]>
wrote in message
-snip-
If I try to run this as in the Workbook_Open event of my add-in, it returns an
error message --
Run-error '1004':
Cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide
command.--
This is true whether the macro is placed directly in the Workbook module; or if
the Workbook_Open event "calls" the above Sub which is in a regular module.
So what is the best way around this issue?
Thanks.
--ron