I am trying to get the content of a row into a 1 dimensional VBA array. I used the very basic way to get the content of the row, by:
1- assigning the range content to an Excel Variant
2- transposing the array twice, to get it from 2 dimensional to 1 dimensional
This works fine in almost all my lines, but I am getting a runtime error 13 'Type mismatch' when one of the cells has a content longer than 255 caracters.
Do you by any chance have any advice on how to solve this issue?
Dim rowContent As Variant
Dim lineCount As Long
Dim curLine As Long
lineCount = Application.WorksheetFunction.CountA(ThisWorkbook.Sheets(editWSName).Range("A:A")) - 2
For curLine = 3 To lineCount + 2
rowContent = Application.Transpose(Application.Transpose(ThisWorkbook.Sheets(editWSName).Range(Cells(curLine, 2), Cells(curLine, colCount))))
...
Next curLine

Dim rowContent() As VariantTranspose. Create another array yourself and populate it from the first one.