lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I ran the code below forgetting to add x=x+1 and excel displayed the message box and no matter what I do, the msgbox wont go and everything got frozen. I had to go to task manager and end the process. Any better way to stop that without losing the code. Thank you
I ran the code below forgetting to add x=x+1 and excel displayed the message box and no matter what I do, the msgbox wont go and everything got frozen. I had to go to task manager and end the process. Any better way to stop that without losing the code. Thank you
Code:
Sub mywhile()
Dim x As Integer
Do While x < 6
MsgBox "hi"
Loop
End Sub