jameserenshaw
New Member
- Joined
- Oct 14, 2013
- Messages
- 2
Hi,
I'm having trouble with a variant when assigned the text values of a range. The piece of code I'm testing is below:
It gives me a type mismatch error, which is odd considering a variant should be able to handle any data type. But if I use 'RecordRows = Range("A7:AB46").value' then it works fine. Only problem is that I need exactly what is in the cell, not the value. Having the value will cause me lots of checking, changing and general headaches.
Any help would be appreciated.
Thanks,
James
I'm having trouble with a variant when assigned the text values of a range. The piece of code I'm testing is below:
Code:
Dim RecordRows As Variant
RecordRows = Range("A7:AB46").text
MsgBox (RecordRows(2, 1))
It gives me a type mismatch error, which is odd considering a variant should be able to handle any data type. But if I use 'RecordRows = Range("A7:AB46").value' then it works fine. Only problem is that I need exactly what is in the cell, not the value. Having the value will cause me lots of checking, changing and general headaches.
Any help would be appreciated.
Thanks,
James