Thread: Macro Control
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
faureman via OfficeKB.com faureman via OfficeKB.com is offline
external usenet poster
 
Posts: 12
Default Macro Control

In Excel, I'm using 2 files (New CU.xls and Error CU.xls) as video
scoreboards. I want to show them at the same time on a single screen space.
"New CU" takes up 80% of the screen and "Error CU" takes up the remaining 20%
as a vertical column on the right.

Upon opening, the primary file (New CU.xls) - calls the secondary file (Error
CU.xls) to open. New CU has several sheets that rotate into the display
window. The following code is used to do this in New CU (and should ONLY work
New CU):

Sub SelectSh1()
Sheets("Sheet1").Select
Application.OnTime Now + TimeValue("00:00:30"), "SelectSh2"
End Sub
Sub SelectSh2()
Sheets("Sheet2").Select
Application.OnTime Now + TimeValue("00:00:30"), "SelectSh1"
End Sub

The issue is that this logic tries to execute in Error CU.xls when it has the
focus. Error CU.xls only has a single sheet (called Alert) that is ONLY used
to display and turn off alerts when required - nothing more.

My question is how to use properties to ensure that the sheet rotation Macros
only apply to New CU.

Also, New CU.xls should keep and regain the focus. Error CU.xls should only
take focus to display or turn off an alert.

Please help.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200708/1