Why Excel always error and stop during run follow code? [let Cells(2,2)=10]
Please Login or Register to view this content.
Please Login or Register to view this content.
Why Excel always error and stop during run follow code? [let Cells(2,2)=10]
Please Login or Register to view this content.
Please Login or Register to view this content.
Remove the "End" statement (2 occurrences).
From Excel help file :
"The End statement stops code execution abruptly, ...."
Because you call WinAPI function, you must be very carefull, don't treat affected sub/function like you call them without WinAPI.
When you call the SetTimer/KillTimer, these functions expect a valid exit point of the sub Main, but in your code, before they can reach it, you have already terminate the process using "End" statement.
1. I care dog
2. I am a loop maniac
3. Forum rules link : Click here
3.33. Don't forget to mark the thread as solved, this is important
Thanks for your teach, I always assumed "End" is need for process to stop timer.
You are welcome, glad I can help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks