How do i stop a running function using a button or menu. Do I use a try catch? for some reason its boggling me.
joel.hahn 0 Newbie Poster
Recommended Answers
Jump to PostIf you have a block of code that is stuck in a very long loop that you want to exit prematurely then you'll need two things.
- a global condition that you can test to do an
Exit
- a call to
My.Application.DoEvents
inside that loopFor example
…
Jump to PostIf you are just looping through a listview then why do you need to exit the loop using a buttor or menu? Surely it will exit after all of the items have been processed. Mayybe you should post the code so we can make a more informed suggestion.
All 6 Replies
boher 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
joel.hahn 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
joel.hahn 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.