pausing a macro

  • Thread starter Thread starter =?iso-8859-1?Q?Hasan_Cans=FC?=
  • Start date Start date
?

=?iso-8859-1?Q?Hasan_Cans=FC?=

Hi,

is there a way to pause the macro, allow the user to
change some values in a worksheet and resume the macro
again?

thanks

Hasan
 
Hasan,

Use Application.Inputbox, with a type of 8, and just ignore (or not) the
range that gets selected.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
if you are running into a situation where execution needs to completel
stop (eg: users want to run a macro, modify the data a day later the
resume execution,) then you might try this

you could split it into two macros

the first runs and creates any output that needs user modification.

and at the end, this first macro writes any required variables t
ranges on a hidden worksheet, then draws a "continue" button with th
second macro assigned to it.

on activation, the second macro deletes the "continue" button, read
the variables from the hidden sheet and finishes the run.

this type of thing requires a lot of error trapping. you need to pla
for the users deleting the hidden variables, or altering the data s
that the second macro can't work properly, etc. i recommend validatin
the data as part of the second macro... (ie: "this sheet contains fiv
rows, it should contain seven. i can not continue." etc.
 
Application.Inputbox, look it up in VBA help as there are various type
options.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top