R
Roshintosh
If I've got the following code in vba
var1 as string
var1 = Cells(1, 1).Value
If the cell in question contains the value "#N/A", then I get a type
mismatch error on the line var1 = Cells(1, 1).Value.
However, no error if the value in the cell in "N/A"
What can I do to get around this, I need var1 to contain the value in
the cell, no matter what value it is.
Also, I wonder why VBA doesn't tell you which line it was executing
when it comes across a type mismatch, I had to find out by stepping
through the code !
var1 as string
var1 = Cells(1, 1).Value
If the cell in question contains the value "#N/A", then I get a type
mismatch error on the line var1 = Cells(1, 1).Value.
However, no error if the value in the cell in "N/A"
What can I do to get around this, I need var1 to contain the value in
the cell, no matter what value it is.
Also, I wonder why VBA doesn't tell you which line it was executing
when it comes across a type mismatch, I had to find out by stepping
through the code !