Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Pause a Macro?

I have written a program that looks up a range on one worksheet based off
certain data like the word "incorrect", if it is "incorrect" I store that
range in a variable called MyRange. What I want to do is using that range
tell the user please update this cell with the correct formula, then turn
control over to the spreadsheet so they can type in a formula, and then after
they hit enter, return control to the program to continue execution. At first
I used an input box, but I don't like they way it works. So is it possible to
Pause execution and then wait for a cell to update. Is there some sort of
afterupdate feature? I know you can write a Private Sub object_afterupdate()
procedure, but this only works with form object. Any help would be great.
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Pause a Macro?

You could split your macro into two pieces.

The user starts the first part, then hits the stop.
Then the user will have to initiate the second portion.

(or use the inputbox to grab your info and keep going)

Jimbo wrote:

I have written a program that looks up a range on one worksheet based off
certain data like the word "incorrect", if it is "incorrect" I store that
range in a variable called MyRange. What I want to do is using that range
tell the user please update this cell with the correct formula, then turn
control over to the spreadsheet so they can type in a formula, and then after
they hit enter, return control to the program to continue execution. At first
I used an input box, but I don't like they way it works. So is it possible to
Pause execution and then wait for a cell to update. Is there some sort of
afterupdate feature? I know you can write a Private Sub object_afterupdate()
procedure, but this only works with form object. Any help would be great.
Thanks.


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Pause a Macro?

You can't do it in the manner that you asked, but you can input the
formula into an InputBox statement.

You say you tried an InputBox and didn't like the way it worked.
I think you should give a better indication of what was wrong with it.
You are not going to have program control during a manual entry
other than through an InputBox which is waiting on your entry.

I have doubts about your
wanting someone to change a formula as opposed to at least giving
them a choice of what is wanted and generating the correct formula
for them, after all you are using a program.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jimbo" wrote in message ...
I have written a program that looks up a range on one worksheet based off
certain data like the word "incorrect", if it is "incorrect" I store that
range in a variable called MyRange. What I want to do is using that range
tell the user please update this cell with the correct formula, then turn
control over to the spreadsheet so they can type in a formula, and then after
they hit enter, return control to the program to continue execution. At first
I used an input box, but I don't like they way it works. So is it possible to
Pause execution and then wait for a cell to update. Is there some sort of
afterupdate feature? I know you can write a Private Sub object_afterupdate()
procedure, but this only works with form object. Any help would be great.
Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pause a macro tsmith Excel Discussion (Misc queries) 9 January 22nd 09 12:47 AM
How do I pause a macro? Dave H Excel Discussion (Misc queries) 5 May 3rd 08 04:53 PM
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
Pause during a Macro Marie[_3_] Excel Programming 6 January 18th 04 12:18 PM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"