[RESOLVED] using input box with multiple option
I was using different input box's to gather information from users.
Now my users wants all the information to be gathered using a single menu.
One option is that i create a form using multiple combo boxes and then load that form to gather the information but that is going to change my code which i don't want.
Can any one suggest me as to how to use a single input box with multiple option to gather info from the users.
A quick help will be appreciated.
Thanks,
Amit
Re: using input box with multiple option
You could possibly present the inoutbox multiple times but it will be best if you just redesign the form.
Re: using input box with multiple option
You can't with an Input box but if you create your own form and "pop it up" like an Input box then you can get all your information at once.
Re: using input box with multiple option
Thanks guys for this superfast help.
Just wanted to have some expert opinion before i proceeded with my idea of creating a form.
Amit :)
Re: using input box with multiple option
Which aspect of your original code did you want to retain? Storing into individual variables the result obtained from the input box?
You could place create properties in your form with the Public Property Get statement... that way you can access the properties individually and would be a good place to start learning about creating interfaces.
So if your original code was
sRetValue1 = InputBox(...)
sRetValue2 = InputBox(...)
you can upgrade it to
frmInputMenu.Show vbModal 'hide form after use to retain values
sRetValue1 = frmInputMenu.Value1 'property named value1
sRetValue2 = frmInputMenu.Value2 'property named value2
Unload frmInputMenu 'unload hidden form if no longer needed
Re: using input box with multiple option
You got it. I think this is not going to change my code much.
Thanks for your help :)
Re: using input box with multiple option
Thanks all,
I have been able to redesign my application without doing much changes in the code
Amit