Reputation: 35
In VBA, I need to have two options for using a variable in an excel cell:
I assume that VBA will give me an error if I tried to read a cell when nothing is in it, so not sure how to do it.
I would like to do something like
A=sheet1.cells(1,1).value
on error goto fail
fail:
A=0
' need to continue here, with A from the cell or set to 0
B=A+1
Upvotes: 0
Views: 44