doctortt
04-04-2011, 12:42 PM
I have codes to check a few cells for blank and space, and my sample codes are like this: (I have the actual working codes by the way)
For each box in range(blabalbahlbah)
If cell is empty, throw an error message: exit sub
If cell has a space, throw an error message: exit sub
Next box
Basically, if excel throws out an error message, I want to give the user an opportunity to re-enter the value and run the program again. But I think I'm relying too much on "exit sub." Is there a way to combine them?
Thanks
For each box in range(blabalbahlbah)
If cell is empty, throw an error message: exit sub
If cell has a space, throw an error message: exit sub
Next box
Basically, if excel throws out an error message, I want to give the user an opportunity to re-enter the value and run the program again. But I think I'm relying too much on "exit sub." Is there a way to combine them?
Thanks