Hello,
Below are my codes I typed in Excel Macro.
I created 4 ListBoxs in a UserForm, then I added years into ListBox1 and ListBox3, and months into ListBox2 and ListBox 4. After that, I set the defalut values to be today year and month repectively, and there is a button called "Calinterest" to get the values from the ListBoxs. But it seems the program cannot get the ListBox4's value if I just click the button without clicking a value in the ListBox4, even if the value in ListBox 4 is highlighted, it always returns nothing. The program works fine if I click all the ListBoxs. Is there something wrong when I set the default value for the ListBoxs?Please Login or Register to view this content.
Thanks,
Howard
Bookmarks