Hello everyone,
I am building a small database with a form and am stuck now. I have uploaded the form, if you try to help, to have a better understanding.
There are two listboxes, whereas the first one is importing the data simply from excel as a range. Seeing the data, I can click on a row, which then is
imported to the second list, which works great and here my problems start.
Because I am a greenhorn when it comes to VBA & Programming, I allowed myself to download a date picker, that I want to use, to choose two dates from,
similar like when you book a Hotel, where you can pick the dates for the stay. This calendar behaves with a one click and works fine, when you enter
for example the chosen/picked day into a textbox.
So importing the row from Listbox1 into the below one works but as soon as I try to work with the calendar, I have two problems.
1. After the chosen line from Listbox1 has been entered into Listbox2, I call the calendar and when clicking a date, I have in the 3 column in Listbox2
my date as expected, but I get an additional entry and as I understand it, with any coding from me, vba does not know what to do and just goes back to Row,Column 0.0 and takes it from there.
I tried to stop it by disable the Listboxes to unload and do all kinds of things but it must be in the Calendarform, that a one click becomes a double-click?
2. The seond one is, I am stuck in a loop, it is frustrating
So, what do I try to achieve? The goal is, that after I have chosen from Listbox1 a row, that
I am also able to enter two dates, which will be added to the line in Listbox2 in column 3 & 4 and then it stops.
I then can either continue by choosing a new line from Listbox1 and so on, or come to the situation, where I then
will export Listbox2 into excel.
I am still testing and building but I can say, that the list will be dynamic and that data will get more
and not every entry from Listbox 1 will end up in Listbox2, therefore dynamic.
Maybe I have to use a workaround and use either a Label or Textbox to store the date inbetween before adding
it, or maybe you a good Idea or solution, how I can solve my issue?
Thank you for any help,
Mike
PS: Maybe within the code, I did something not so clever, so please guide me
Bookmarks