Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 3 out of 5     Rate this Document

Why Do I Get a "Type Mismatch" Error When Trying to Run my Microsoft Visual Basic Program?

Primary Software: Measurement Studio>>Enterprise Edition (Full Development System)
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Professional Edition (Base Package), Measurement Studio>>Standard Edition (Starter Kit)

Problem:
I am using a Measurement Studio control in my Microsoft Visual Basic program. Why do I get an error that says a Type Mismatch occurred when I invoke one of the control's methods?

Solution:
First, check that there are no inconsistencies between the data types you are using in your method call, and those that are specified in the method help. You can access the help for any Measurement Studio control by selecting the control on the form and pressing F1. Be sure to check the type of any output parameters that are set by the method.

You do not have to declare array variants with parentheses. It is sufficient to declare the variable solely as Variant.

For more information on using variants in your program, refer to the Developer Zone Tutorial: Working with Variants in Visual Basic.

Related Links:
Developer Zone Tutorial: Working with Variants in Visual Basic

Attachments:





Report Date: 12/03/2001
Last Updated: 11/12/2008
Document ID: 2G2BES6E

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit