How To: Excel user defined function with user defined argument constants/structures

Kevin McCartney 21 Reputation points
2022-06-17T11:14:16.25+00:00

Hi to whom it may concern,

within Excel VBA, is it possible for a user defined function to provide predefined constant/structure values for the each potential declared argument, just like other internal VBA functions already do?

i.e. for illustration purposes, take say the VBA MsgBox function, we can see here for the 'Button' argument its default value is pre-set to vbOKOnly, but there's a provided list of argument constant/structure values that a user can select from.

212400-msgbox.png

... hence my question, can a user defined function replicate the same visual functionality but with a user defined list of constant/structure values in order to limit what a user can select?

Thankyou in advance.

Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,640 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful