G
Guest
Hi all,
I'm getting an error passing a variable to another sub when calling it.
I've created a user-defined variable. It has multiple variables, which I
reference like: var.item1 = value. They are all Strings.
The definition is in a Module called UserDefinedVariables. When the user
clicks on a button, it gets the name of a file, opens it and places line
values into the custom variable.
I then want to pass that variable to another sub where it will add the
information to the DB. But when I call the other Sub, I get a Type Mismatch
error and I can't figure out why.
The Sub header is: Private Sub InsertDB(data As rptData)
I call the Sub using: InsertDB(newRptData)
I don't understand why there would be a Type Mismatch.
Any suggestions are appreciated.
Thanks,
Jay
I'm getting an error passing a variable to another sub when calling it.
I've created a user-defined variable. It has multiple variables, which I
reference like: var.item1 = value. They are all Strings.
The definition is in a Module called UserDefinedVariables. When the user
clicks on a button, it gets the name of a file, opens it and places line
values into the custom variable.
I then want to pass that variable to another sub where it will add the
information to the DB. But when I call the other Sub, I get a Type Mismatch
error and I can't figure out why.
The Sub header is: Private Sub InsertDB(data As rptData)
I call the Sub using: InsertDB(newRptData)
I don't understand why there would be a Type Mismatch.
Any suggestions are appreciated.
Thanks,
Jay