In the following sub 'Private Sub TabStrip1_Click(),' I placed the following lines of code after displaying an error message
that tells the user he/she must answer ALL questions in the current tab before going to the next tab. What happened before
was that I could click on tab 2 and the error message comes up, but the focus is now on the second tab, BUT I return to where
I was left off. It confuses the user since the focus is now on the secnod tab. So, I placed the code below, and it does go back to tab
1, but VB is treating it as a click event, therefore it jumps back to the top of the sub and goes through the whole sub again, hence,
displaying the error message every time!
With TabStrip1
.Tabs(1).Selected = True
.Setfocus
End With
that tells the user he/she must answer ALL questions in the current tab before going to the next tab. What happened before
was that I could click on tab 2 and the error message comes up, but the focus is now on the second tab, BUT I return to where
I was left off. It confuses the user since the focus is now on the secnod tab. So, I placed the code below, and it does go back to tab
1, but VB is treating it as a click event, therefore it jumps back to the top of the sub and goes through the whole sub again, hence,
displaying the error message every time!
With TabStrip1
.Tabs(1).Selected = True
.Setfocus
End With
