What you need to do is put your code into the
Click
event handler for the refresh button - that way, you have eliminated part of your test, so you end up with:
If Num_Of_Routing = 1 Then
MessageBox.Show("Make sure you have made the first route")
End If
To get the Click event handler, open up your form in Visual Studio, and double click on the button. This will either create an empty
Click
event handler for you, or take you to one that you've added previously.