Dear friends,
I have a simple userform with a combobox populated with name of months. I opens it each time I double-click in a cell. If the cell contains a month name, the combobox sets that as its value or as the current month if the cell does not match to a month name. Works fine.
I am passing the cell value to the userform with its Tag property since there is no other way we can easily pass input variables to a form. I am not comfortable in using global variables.
Once the user selects a month in the combobox and accepts it by pressing the Accept button, I want the userform to return the selected value for the month. If the userform is closed otherwise by its closing button, I want the userform to return the value passed into it. I have checked the coding for this functionality by printing out Tag property of userform when the form is about to close (using QueryClose event of the form). But I am stuck up how it has to be passed back the calling program when the userform is deactivated.
My sample file is attached.
Regards,
Pravin Kumar.
Bookmarks