Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I make a subroutine with a parameter that has a fixed set of
possible values? I want something similar to the box that pops up for a boolean with only 'true' and 'false' options. Also, is it possible to populate the pop up box with options such as 'red', 'blue' that correspond to values such as '1', '2'? ------ Aaron *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
do you mean in the VBE? Where does this box popup with True and False?
-- Regards, Tom Ogilvy "Aaron" wrote in message ... How do I make a subroutine with a parameter that has a fixed set of possible values? I want something similar to the box that pops up for a boolean with only 'true' and 'false' options. Also, is it possible to populate the pop up box with options such as 'red', 'blue' that correspond to values such as '1', '2'? ------ Aaron *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Aaron,
In Excel 2000 or later, you can use Enum type variables. For example, Public Enum MyEnum Red = 1 Blue = 2 End Enum Then, declare the argument to the procedure As MyEnum. For example, Sub Test(WhatColor As MyEnum) ' your code here End Sub Finally, you can use a value of the enum in the code that calls the procedure. Test WhatColor:=Blue -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Aaron" wrote in message ... How do I make a subroutine with a parameter that has a fixed set of possible values? I want something similar to the box that pops up for a boolean with only 'true' and 'false' options. Also, is it possible to populate the pop up box with options such as 'red', 'blue' that correspond to values such as '1', '2'? ------ Aaron *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great!. Thanks for the help. This is exactly what I was looking for.
------ Aaron *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change the values of cells by a fixed factor i.e. 10/100= 0.10 | Excel Discussion (Misc queries) | |||
How do I add up texts as fixed number values in a row? | Excel Discussion (Misc queries) | |||
Drop down box of names with fixed values? | Excel Worksheet Functions | |||
drawdown at fixed rate over set period from investment at fixed % | New Users to Excel | |||
how to divide all values with a fixed value ? | Excel Discussion (Misc queries) |