Visual Basic is able to convert and coerce many values to accomplish data type assignments that weren't possible in earlier versions. However, this error can still occur and has the following causes and solutions:
Try to make assignments only between compatible data types. For example, an Integer can always be assigned to a Long, a Single can always be assigned to a Double, and any type (except a user-defined type) can be assigned to a Variant.
Pass the appropriate single property or call a method appropriate to the object.
Debug.Print MyModule
Specify an expression that can be displayed.
Error CVErr(n)
To regenerate an error, you must map it to an intrinsic Visual Basic or a user-defined error, and then generate that error.
MyVar = CDate(CVErr(9))
Use a Select Case statement or some similar construct to map the return of CVErr to such a value.
To print arrays, create a loop that displays each element individually.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).