I've attached an Excel workbook that contains a function that sort of works for the problem I'm trying to solve. I have some experience with VBA but none with user forms.
How can you add items to a combo box programmatically?
I need a user form to display combo boxes that represent months of the year. Each combo box should give the user the following list of choices: -2,-1,0,1,2
I found the shell of a solution on the web which I've modified as best as I can (attached).
The attached function adds months based on an array passed to it - I can do that. I can't get the combo boxes to display the list of numbers shown above.
Ultimately the function should return the value selected by the user for each month that was passed to the function.
Any help would be much appreciated!