ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox (https://www.excelbanter.com/excel-programming/286245-listbox.html)

ben.c

Listbox
 
Hi,
I have a userform with 2 listbox from whicht the user can choose the start date and the end date.
I put at the activation of the userform in each listbox a series of dates. I would like than when the user choose a date for the start date, the date possible for the end date start by this one. And If the user put in first the end date, I would like than the date available for start date end with this one. My problem is that I don't know how to choose an item from my listbox.
Can you help me ?
Thanks and happy new year
Benjamin

Harald Staff

Listbox
 
Hi Benjamin

You choose value #3 from the top like this:

ListBox1.Listindex = 2

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Ben.c" wrote in message
...
Hi,
I have a userform with 2 listbox from whicht the user can choose the start date and the

end date.
I put at the activation of the userform in each listbox a series of dates. I would like

than when the user choose a date for the start date, the date possible for the end date
start by this one. And If the user put in first the end date, I would like than the date
available for start date end with this one. My problem is that I don't know how to choose
an item from my listbox.
Can you help me ?
Thanks and happy new year
Benjamin




ben.c

Listbox
 
Thanks Harald, And Maybe you can answer a second question for me
In the same userform, I would like to put different group of option button. Or if I just put all the one I need, VBA think they are all in the same group, and only one is available. How can I do to have 3 group and so have 3 option button true at the same time
If you can help you are the best lo
Thanks for your hel
Benjamin

Harald Staff

Listbox
 
Hi again Benjamin

Optionbuttons put in the same "container" is in the same group and only one is True then.
A userform is a container, but so is a Frame control. So put three frames onto the form
and fill each of them with the necessary amount of option buttons.

(This goes for userforms. For controls on worksheets it's somewhere between a little worse
and impossible.)

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Ben.c" wrote in message
...
Thanks Harald, And Maybe you can answer a second question for me ?
In the same userform, I would like to put different group of option button. Or if I just

put all the one I need, VBA think they are all in the same group, and only one is
available. How can I do to have 3 group and so have 3 option button true at the same time
?
If you can help you are the best lol
Thanks for your help
Benjamin





All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com