ScriptLibrary, Mismatch

Hi:

I’m trying to pass variables to a script library. The variable in question is a string and has been declared as such when the library is called from a button. I’m trying to pass the value to a sub using:

Call setcolumnheadings(object, key)

I’m declaring it at the beginning of thenext sub like this:

Sub setcolumnheadings(sheet As Variant, key As String)

When I run it through the debugger I can see the value of key, and see that it’s set as a string and yet I still get a Mismatch on it. Why?

Any suggestions on how this can be fixed would be appreciated.

Thanks

Subject: ScriptLibrary, Mismatch

Hi,

What is the value of the key? maybe your passing a value that, the data type is not what you declared. Maybe you should convert it to string before you put it to the key variable.

Inside your setcolumnheadings, how do you use the key variable, like as key to search for a particular doc. or maybe your comparing it to another variable with different data type.

Thats all i can remember when i’m debugging a type mismatch.

Mon