TheMadTree
New Member
- Joined
- Mar 23, 2015
- Messages
- 25
Good afternoon,
I'm looking for a way to define an 'On error' statement that would just work for the line underneath the statement.
With the statement below, I'm looking for a (week)number from 1 to 53.
Weeknumber = InputBox("What week are you after")
If the user would enter anything else I would like it to refer to a section that I called 'NotValidInput'. Unfortunately the statement 'On error goto NotValidInput' seems to work for the whole macro not just for that one line.
Can anyone help me?
Thank you!
I'm looking for a way to define an 'On error' statement that would just work for the line underneath the statement.
With the statement below, I'm looking for a (week)number from 1 to 53.
Weeknumber = InputBox("What week are you after")
If the user would enter anything else I would like it to refer to a section that I called 'NotValidInput'. Unfortunately the statement 'On error goto NotValidInput' seems to work for the whole macro not just for that one line.
Can anyone help me?
Thank you!