Hi all,
I'm getting an error when I try to use a string with the Chr(34) in Excel 2007. I had a somewhat long string calculation giving me the error, but I tried to test it with a simple one. Here's the example code:
I get this error on the "a = ..." line:
Run-time error '13': Type mismatch
I've searched around, but for the life of me can't figure out what could be wrong.
Thanks for any help!
Cheers,
I'm getting an error when I try to use a string with the Chr(34) in Excel 2007. I had a somewhat long string calculation giving me the error, but I tried to test it with a simple one. Here's the example code:
Code:
Sub Test()
Dim a As String
a = Chr(34) And "This is a test" And Chr(34)
Sheets(1).Cells(1, 1).Value = a
End Sub
I get this error on the "a = ..." line:
Run-time error '13': Type mismatch
I've searched around, but for the life of me can't figure out what could be wrong.
Thanks for any help!
Cheers,