Defined Enum's used in Function Calls don't seem to work anymore. Has something changed?

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
232
Office Version
  1. 365
Platform
  1. Windows
This an example of an Enum definition
VBA Code:
Enum XXX
    X1 = 1
    X2 = 2
End Enum

I will define a function I will call "Test
VBA Code:
Function Test(Arg as XXX)
   ' Some Code
End Function

When I type in
VBA Code:
Call Test(
all I see is
VBA Code:
Test:Display as XXX)
and no drop-down list appears where I use to see a Dropdown list where I could select either "X1" and "X2".

If you use a VBA non-Enum term like "Boolean" as in "Call Test(Arg as Boolean)", you see
a Dropdown list showing"True" and "False".

Any idea what I have done wrong, or has something changed in VBA?
 

Attachments

  • 210613 Drop Down.jpg
    210613 Drop Down.jpg
    10.2 KB · Views: 3

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Instead of :
VBA Code:
Call Test(
Try :
VBA Code:
Call Test(xxx
 
Upvote 0
I don’t understand how this is not monitored. I am a “Board Regular” and have been for years.

Could you please explain.

Thanks,

Mackeral
 
Upvote 0
After much energy trying to figure this out, I find that if I start a new workbook, everything works fine. However when I try to do the same thing in the original workbook it doesn't.

So if something looks impossible, try testing it in a new workbook.
 
Last edited:
Upvote 0
Much embarassed. In in one of the Workbooks the Name was "Data_Err_Msg_Knt" and in the other workbook it was "Data_Msg_Err_Knt".
 
Upvote 0
Solution

Forum statistics

Threads
1,214,621
Messages
6,120,568
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top