473,396 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Parameter as a list

Hi

If I type in VB msgbox "prompt", at this point I have a list of available options vbAbortRetryIgnore... vbApplicationModal... and so on

Is there a way to create a sub routine with similar parameter which appear as a list. I want my partner to be able to use the procedure and select Edit, Add, Delete from a list instead of typing it (to avoid confusion).

Many thanks in advanced.
Emil
Sep 19 '09 #1

✓ answered by FishVal

You have to declare a type for an enumeration using "Enum" instruction. Then declare your subroutine argument as type of this enumeration.

3 1662
FishVal
2,653 Expert 2GB
You have to declare a type for an enumeration using "Enum" instruction. Then declare your subroutine argument as type of this enumeration.
Sep 19 '09 #2
Thanks FishVal that is excellent.

I must admit I have studied in the past but didn't get the use of it until now when I needed it :)

Thanks for your help.
Sep 19 '09 #3
FishVal
2,653 Expert 2GB
You are quite welcome. :)
Sep 19 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Alex Panayotopoulos | last post by:
Hello all, Maybe I'm being foolish, but I just don't understand why the following code behaves as it does: - = - = - = - class listHolder: def __init__( self, myList= ): self.myList =...
0
by: David Furey | last post by:
Hi, I am using the XSLT document to filter records from an XML document The XSL is shown below: I have a parameter named "search-for" that is used to bring back a list of Vendor Names that...
20
by: Brien King | last post by:
If I have a parameter that has an Object type (as opposed to something like a string), can I make that parameter a CONST? Right now, if you pass an object into a sub/function, that sub/function...
10
by: Tracy | last post by:
Dear all, I have encountered a problem in passing a VARCHAR parameter (which is a list of accepted values) to the IN predicate of a DB2 user-defined function. For example, I have a table...
11
by: Matthias Pfeifer | last post by:
Hi there, I am trying to declare a function that takes a std::list<parameter. I want this function to have an empty list as a default parameter. It's a template function also. Currently i am...
12
by: ArunDhaJ | last post by:
Hi Friends, Is it possible to pass a table as a parameter to a funtion. whos function declaration would look some thing like this.... ALTER FUNCTION TempFunction (@TempTable TABLE, @nPId INT) ...
4
by: sam | last post by:
I use a List<Tand the method FindLastIndex like this: List<XmlNodeListArticle; int iIndex = ListArticle.FindLastIndex(TheSameYear); .... private bool TheSameYear(XmlNode n) { if(....) return...
0
by: =?Utf-8?B?QnJpYW4gSi4gTWF0dXNjaGFr?= | last post by:
Greetings: I am attempting to use one dropdownlist to filter the contents of another as demonstrated within this MSDN article: http://msdn2.microsoft.com/en-us/library/aa581791.aspx. Oracle 10...
2
by: Curious | last post by:
I have two methods that are almost identical, except for the "HtmlLogger varLogger" parameter passed to #2. In #1, it uses a default HtmlLogger "logger" while in #2, it uses "varLogger" parameter....
6
by: HillBilly | last post by:
One question I have not figured out is how to learn which event parameter list is supported by a control? EventArgs, CommandEventArgs, what?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.