ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Type mismatch (https://www.excelbanter.com/excel-programming/441275-type-mismatch.html)

Nigel Barton

Type mismatch
 
Can anyone help? I am getting "Type mismatch (error 13)" when I try to call a
method. The method is on a class module. The call is from a userform sub.

The call:
Dim DataSource as Leaf ...
Set DataSource = new Leaf
.... various properties of DataSource are used successfully ...
.... then the problem call ...
DataSource.Insert 1,"^" <<. msg occurs trying to execute this line
....

The method:
In class module "Leaf" ...

Public Sub Insert (ipOrdinal, ipSubValue)

Dim Ordinal
Dim SubValue
.... various statements
.... call to another method
Exit Sub

Nigel Barton

Type mismatch
 
Problem solved.


--
Nigel Barton


"Nigel Barton" wrote:

Can anyone help? I am getting "Type mismatch (error 13)" when I try to call a
method. The method is on a class module. The call is from a userform sub.

The call:
Dim DataSource as Leaf ...
Set DataSource = new Leaf
... various properties of DataSource are used successfully ...
... then the problem call ...
DataSource.Insert 1,"^" <<. msg occurs trying to execute this line
...

The method:
In class module "Leaf" ...

Public Sub Insert (ipOrdinal, ipSubValue)

Dim Ordinal
Dim SubValue
... various statements
... call to another method
Exit Sub



All times are GMT +1. The time now is 12:52 AM.

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