ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call Object_Exit : Type mismatch (https://www.excelbanter.com/excel-programming/282155-call-object_exit-type-mismatch.html)

Kevin McCartney[_2_]

Call Object_Exit : Type mismatch
 
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



patrick molloy

Call Object_Exit : Type mismatch
 
Call cboProduct_Exit(False)

Private Sub cboProduct_Exit(ByVal Cancel As Boolean)

Just sue the Boolean type by itself

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
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


.


Tom Ogilvy

Call Object_Exit : Type mismatch
 
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.

--
Regards,
Tom Ogilvy

Kevin McCartney wrote in message
...
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






All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com