UPDATE:
I had two problems that contributed to this error. First, I had a clash with a SAS add-in that was messing up the copy/paste functionality. Second, I had a null value in the array that was causing the transposition to fail. I have handled the null and everything works fine.
I'm trying to assign an array of values to my Excel worksheet. When I use the TRANSPOSE function I am getting type mismatch errors. I don't understand why, there are only about 200 "rows" in the set:
Worksheets("xyz").Range("A2").Resize(ValidCode, 5).Value = & _
Application.WorksheetFunction.Transpose(CodeData)
It works fine when I put a static value instead of the transposed array. I don't understand what's happening to it. It is type "Variante/Variante(0 to 4, 0 to 205)"
The array needs to be transposed because I had to redim preserve it in a code loop (so the "columns" are rows, etc.) I guess I could manually transpose it, but that seems unnecessary.
&
character is not necessary. WhatType
isValidCode
and what is its value? – David Zemens Jul 18 '13 at 16:39