I have a user-defined function that takes a parameter which has an associated builtin enum
:
Public Function bgrcolor_cells(rng As Range, xlcl As Long) As Integer
I want to write a formula like this in a cell
=bgrcolor_cells($A2:$B2,vbRed)
instead of
=bgrcolor_cells($A2:$B2,255)
Is that possible? How?
PS: I have found How can I use enum identifiers in Excel UDF, but it refers to user-defined Enums. I do not know if the fact that I want to use a builtin Enum makes a difference.
EDIT 1 Perhaps some automated reading of the code where the builtin Enum is defined may help in defining either the Class by Jean-François Corbett or named ranges, and then one would avoid typing from scratch. I have seen such automated parsing, possible pointers are:
http://www.cpearson.com/excel/EnumNameList.aspx
http://www.excelforum.com/excel-programming-vba-macros/356892-programmatic-generation-of-enum-to-string-functions.html
EDIT 2 (as per this) A comment has been posted stating that "there is no difference for built-in and user-defined enums", and that this is a dupe. I think it is not, and that if the quoted comment is correct, then it may be part of an answer (perhaps worth posting as such) for the present specific and different question.