In the code for the form, you have a sub called HeaderAndFooter_Initialize. You never call this. I am not sure what you intend there. For this code to run automatically when the form is created, it must be called UserForm_Initialize.
In that sub you have a number of references in the code for the form that don't exist, so it won't compile and therefore the form won't open if we fix the name. For example
There is no CityListBox.
There are two strategies for using a UserForm to collect data for something. One is to show the userform and do all the work in the UserForm. The other is to show the userform, then close it, then extract the data from the userform controls. I will be doing the first. I am moving your called HeaderFooter in Module1 into the userform code to run on the click event for the OK button.
You must always validate user input. I added that at the beginning of the sub.
Bookmarks