How to have a List as Parameter

JamworkS

Registered User.
Local time
Today, 15:55
Joined
Sep 1, 2011
Messages
49
Hiya guys,

I'm trying to create a function for a project I'm working on, and want to make a "fool-proof" function. The way I want it, it's that there are gonna be two parameters, and both I would like them to be a list, so the user can't type anything they want, just select it from that list. The best exampl would be when you type msgbox and then the "dialog style" parameter drops down a list with "vbcritical", "vbinformation", etc ...

Is there any way to create that in a user defined function? I just want something like:

Code:
Function myFoolFunction (A as List, B as List) 'I'm just simplifying here

End function

So, the other users would only have to select from a defined list, both parameters.

I hope I've made myself understood.

Cheers mates ;).
 
Your users interact with your database via controls on a form. You as a developer write code to interact with those controls. Your user will not be selecting anything or entering anything into a function.

Look into a Listbox control or a Combo Box control.
 
Well, the realilty is that this users are "pro" users, they can see and access the code, but I just want to have a list that drops down when they type the function. That's all.

I know I can open a form for them to choose which parameter from a Dropdown list, but I don't want that.

Thanks again.
 
Well, it's not bad but I don't think it's what I'm looking for. But thanks anyways.
 
That's the best you can get in the VBA editor. We're dealing with the VBA editor now and not just controls.

Perhaps you want to research into plug-ins or other VBA editors that allow you to do this.
 

Users who are viewing this thread

Back
Top Bottom