LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Stop running macro button, like Ctrl-Break button

Hello,
I have a button on the Quick Access Toolbar of an Excel 2007 workbook that
starts a slide show and loops through 8 sheets continuously until a linked
cell equals 39. I would like to add another button to the Quick Access
Toolbar that stops the running slide show like Ctrl-Break does without the
Visual Basic window popping up with the message Code execution has been
interrupted.

Any suggestions?

Below is my code.

Sub SlideShow()

Worksheets(Array(1, 2, 3, 4, 5, 6, 7, 8)).Select
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHeadings = False 'Remove Row & Column headings
Application.DisplayFormulaBar = False
Do While Worksheets("TOTAL").Range("C42").Value < 39
Refresh
Sheets("Sheet1").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet2").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet3").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet4").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet5").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet6").Select
Range("A1").Select
Pause
Refresh
Sheets("Sheet7").Select
Range("A1").Select
Pause
Refresh
Sheets("TOTAL").Select
Range("A1").Select
Pause
Loop

End Sub

 
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
Stop running macro button, like Ctrl-Break button Dave Peterson Excel Programming 1 January 22nd 09 05:23 PM
Stop running macro button, like Ctrl-Break button Ronald R. Dodge, Jr.[_2_] Excel Programming 0 January 22nd 09 04:59 PM
How to stop macro with cancel button Alex St-Pierre Excel Programming 8 March 13th 08 01:53 PM
Start/Stop Macro Button Paul987 Excel Discussion (Misc queries) 1 July 10th 06 05:14 PM
Stop Macro button in Excel VB grahammal[_2_] Excel Programming 4 November 11th 05 02:35 PM


All times are GMT +1. The time now is 06:58 AM.

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"