Computerman
Board Regular
- Joined
- Mar 3, 2016
- Messages
- 91
In my spreadsheet there is one place that the user can enter a value that can cause an error. I have created an error handling routine that captures the error and clears out the cell the error occurred in. What I need is to make that cell active. Here is the error handling code I have created:
Code:
ErrorHandler:
MsgBox "arrival Time must be entered with a space between the time and AM or PM. IE 10:00 AM", , "Invalid Arrival time"
Sheet1.Cells(RC, 4).Value = ""
ActiveSheet.Cells(RC, 4).Select
[\code]
RC is set to the current row and column 4 is the cell that the error occurred in. The message box appears, the user clicks OK, the cell contents are cleared but the active cell is not the cell that the error occurred on. I have also tried changing the ActiveSheet to Sheet1 but that did not help.
thanks,
Computerman