Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VBA macro pausing

Hi,
I have a macro that opens and closes several worksheets. However, the
macro does not work when run. However if I step thru it with the F8
function key, the macro works perfectly. I suspect I need to pause
the macro to allow it time to go to the various pages.
Question is how do I pause the macro in midstream, allow it time to
open and close the various pages and then continue with the remaining
instructions
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default VBA macro pausing

See Wait Method in Excel Help!

Regards,
Stefi

ezt *rta:

Hi,
I have a macro that opens and closes several worksheets. However, the
macro does not work when run. However if I step thru it with the F8
function key, the macro works perfectly. I suspect I need to pause
the macro to allow it time to go to the various pages.
Question is how do I pause the macro in midstream, allow it time to
open and close the various pages and then continue with the remaining
instructions

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default VBA macro pausing

My bet is that the macro fails when you use a shortcut key to start it. If you
ran it via the tools|macro dialog or from a button, it would also run correctly.

If that's the case, I bet your shortcut key includes the shift key.

If that's the case, remove the shift key from that shortcut key combination.

If you have a workbook that has a workbook_open event or an auto_open procedure,
then if you open that file with the shift key held down, you stop those
procedures from running.

The shift-key in the shortcut combination confuses excel/vba to stop after you
open a file using one of those shortcut keys.



wrote:

Hi,
I have a macro that opens and closes several worksheets. However, the
macro does not work when run. However if I step thru it with the F8
function key, the macro works perfectly. I suspect I need to pause
the macro to allow it time to go to the various pages.
Question is how do I pause the macro in midstream, allow it time to
open and close the various pages and then continue with the remaining
instructions


--

Dave Peterson
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
pausing a macro to input cell contents blipityblap New Users to Excel 3 January 13th 09 11:01 PM
Pausing a macro Alex.W Excel Discussion (Misc queries) 2 August 10th 07 11:30 AM
Pausing Macro Patches New Users to Excel 2 March 28th 07 03:00 AM
Is there a way of pausing a macro Shazza Excel Discussion (Misc queries) 2 March 12th 07 10:59 PM
Pausing a Macro PaulW Excel Discussion (Misc queries) 0 May 30th 06 02:05 PM


All times are GMT +1. The time now is 07:11 PM.

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

About Us

"It's about Microsoft Excel"