Which button was pressed?
Sorry Bob, I don't understand.
I have written Private subs that make my userform (named
ChooseCohort) work as required.
I've summoned the dialog from a Module (see below) but
after closing the dialog nothing happens (i.e. I can never
get the Msgbox to appear). That's one problem.
I'm calling the userform from a module (instead of putting
the code into the userform) so that I can use the form in
several different subs.
My other problem, and the one that I mentioned in my first
posting, is that I want it to do nothing if the Cancel
button was the way out of the userform.
Sub Test()
ChooseCohort.Show
If ChooseCohort.CheckBoxER1.Value = True Then MsgBox "ER1"
End Sub
-----Original Message-----
Adrian,
They would have separate click even ts so you can tell
that way.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Adrian" wrote in message
...
I have a custom dialogue that I need to use in two very
different macros. Hence my OKButton_Click routine is
empty
except for Unload UserForm, so that the calling macros
can
each do their own thing.
But how can the calling macros tell if it was the
OKbutton
or the Cancelbutton that was pressed?
.
|