ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Halting code for worksheet manipulation? (https://www.excelbanter.com/excel-programming/315764-halting-code-worksheet-manipulation.html)

What-a-Tool[_2_]

Halting code for worksheet manipulation?
 
I have a project where a user fills a collection with worksheets that have
been selected for changes. The code then opens the worksheet, performs some
action on the worksheet, and then closes it. On close I wish to show a form
with several options for the user to select from.

My problem is getting the code to stop execution while each worksheet is
loaded. (worksheet should now be modal). I can make my form modal to stop
execution, but then can't touch the worksheet.
Is there a way that this could be done?

Thanks

--

/ Sean the Mc /

"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous




Tom Ogilvy

Halting code for worksheet manipulation?
 
Not very robust, but you could have your macro end and then restart it using
the sheet events.

There isn't any built in support for pausing a macro for user input beyond
the refedit control on a userform (allows a user to select a range).

The usual approach is to control the interaction with a userform, using code
to update the sheet with data solicited on the userform.

--
Regards,
Tom Ogilvy


"What-a-Tool" wrote in message
news:N8oid.58301$UA.810@lakeread08...
I have a project where a user fills a collection with worksheets that have
been selected for changes. The code then opens the worksheet, performs

some
action on the worksheet, and then closes it. On close I wish to show a

form
with several options for the user to select from.

My problem is getting the code to stop execution while each worksheet is
loaded. (worksheet should now be modal). I can make my form modal to stop
execution, but then can't touch the worksheet.
Is there a way that this could be done?

Thanks

--

/ Sean the Mc /

"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous






What-a-Tool[_2_]

Halting code for worksheet manipulation?
 
There isn't any built in support for pausing a macro for user input beyond
the refedit control on a userform (allows a user to select a range).


Thanks - thats kinda what I suspected - time to think of another way to do
things.

--

/ Sean the Mc /

"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous




All times are GMT +1. The time now is 11:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com