Call Object_Exit : Type mismatch

K

Kevin McCartney

Hi,
I'd like to run the following code but get a Compile
error: "Type mismatch"

Call cboProduct_Exit(False)
the procedure that I want to call has the following
parameters

Private Sub cboProduct_Exit(ByVal Cancel As
MSForms.ReturnBoolean)

any ideas on how to make this work would be much
appritiated.

cheers
TIA
KM
 
P

Patrick Molloy

Call cboProduct_Exit(False)

Private Sub cboProduct_Exit(ByVal Cancel As Boolean)

Just sue the Boolean type by itself

Patrick Molloy
Microsoft Excel MVP
 
T

Tom Ogilvy

Put the code in a common sub and have the Exit event call that as well as
your code.

Otherwise you can try

Dim bBool as MSForms.ReturnBoolean
bBool = False
Call cboProduct_Exit(bBool)

Untested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top