How do you abstract a form from a task which it executes?
I have a simple form which allows ths user to select a month from a drop-down box, and then click either OK to bring about an action based on that selection, or Cancel. This works fine if I use it for one specific task, e.g. setting worksheet headers to the month that the user chose.
However, I want to use the same form in several (different) situations and can't find a way of abstracting the task from the form. Rather than having the "stuff to be done" in the
event of the OK button, I want to return the fact that the user clicked OK and have the task's code elsewhere. I've tried declaring a public boolean in the form's code, setting it according to which button was clicked, and then referencing it from another module, but this doesn't work.
Any help would be greatly appreciated. I hope I've been clear enough!
Thanks
I have a simple form which allows ths user to select a month from a drop-down box, and then click either OK to bring about an action based on that selection, or Cancel. This works fine if I use it for one specific task, e.g. setting worksheet headers to the month that the user chose.
However, I want to use the same form in several (different) situations and can't find a way of abstracting the task from the form. Rather than having the "stuff to be done" in the
Code:
_Click()
Any help would be greatly appreciated. I hope I've been clear enough!
Thanks