Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pause a macro to allow editing

I have designed a macro in Excel 2003 with a yes/no message box. It is
working properly but I need to be able to stop the macro with the yes click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Pause a macro to allow editing

You can split your macro into two parts.

Run the first portion.
do the work
run the second portion.



Susanlwh wrote:

I have designed a macro in Excel 2003 with a yes/no message box. It is
working properly but I need to be able to stop the macro with the yes click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Pause a macro to allow editing


Dave Peterson wrote:
You can split your macro into two parts.

Run the first portion.
do the work
run the second portion.



Susanlwh wrote:

I have designed a macro in Excel 2003 with a yes/no message box. It is
working properly but I need to be able to stop the macro with the yes click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!


--

Dave Peterson


Just put a pause in the code, run it and then when you want it to
resume just hit the next line command and then play. I'm guessing this
is just for code editting, or is it more of a user interface thing
where you ask the person to check for duplicates, if they hit yes it
pauses the code and resumes on enter?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Pause a macro to allow editing

If you talking about the user editiing the WS, then follow Dave's advice, as
you cannot edit the WS in Edit Mode whilst code is running.
Otherwise, you can do your "editting" in code.

NickHK

"Susanlwh" wrote in message
...
I have designed a macro in Excel 2003 with a yes/no message box. It is
working properly but I need to be able to stop the macro with the yes

click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pause a macro to allow editing

This is exactly what I need to do!
It more of a user interface thing
where you ask the person to check for duplicates, if they hit yes it
pauses the code and resumes on enter?


How do I pause the code?

"Stopher" wrote:


Dave Peterson wrote:
You can split your macro into two parts.

Run the first portion.
do the work
run the second portion.



Susanlwh wrote:

I have designed a macro in Excel 2003 with a yes/no message box. It is
working properly but I need to be able to stop the macro with the yes click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!


--

Dave Peterson


Just put a pause in the code, run it and then when you want it to
resume just hit the next line command and then play. I'm guessing this
is just for code editting, or is it more of a user interface thing
where you ask the person to check for duplicates, if they hit yes it
pauses the code and resumes on enter?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Pause a macro to allow editing

Basically, you can't.
See my earlier post.

NickHK

"Susanlwh" ...
This is exactly what I need to do!
It more of a user interface thing
where you ask the person to check for duplicates, if they hit yes it
pauses the code and resumes on enter?


How do I pause the code?

"Stopher" wrote:


Dave Peterson wrote:
You can split your macro into two parts.

Run the first portion.
do the work
run the second portion.



Susanlwh wrote:

I have designed a macro in Excel 2003 with a yes/no message box. It
is
working properly but I need to be able to stop the macro with the yes
click
and edit the spreadsheet for any duplicate entries.

I would like to be able to:
Click the yes button
Edit the spreadsheet
Hit enter to resume the macro

Any thoughts would be appreciated!

--

Dave Peterson


Just put a pause in the code, run it and then when you want it to
resume just hit the next line command and then play. I'm guessing this
is just for code editting, or is it more of a user interface thing
where you ask the person to check for duplicates, if they hit yes it
pauses the code and resumes on enter?




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Pause a macro to allow editing

I assumed you were just looking at your code and seeing what it does to
data, and then resuming your code.

You need to do what Dave mention first off. On vbyes then endsub, then
somehow have another button to resume, or however you want to trigger
the after checking sub, maybe a checkbox that appears on your sheet if
the user selects yes, and after they tick the box it fires off the
second sub.

What if the person selects no, well then the checkbox on the sheet
remains hidden and the second sub is run straight away.

Stopher

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
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
Pause Macro cottage6 Excel Programming 2 April 14th 06 04:23 PM
Pause a macro to allow editing of a worksheet captbluefin[_10_] Excel Programming 2 December 3rd 03 05:39 PM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


All times are GMT +1. The time now is 07:43 AM.

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"