Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try specifying the workbook
Sub SelectSh1() workbooks("CU").Sheets("Sheet1").select Application.OnTime Now + TimeValue("00:00:30"), "SelectSh2" End Sub "faureman via OfficeKB.com" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In essence, simply open up the select part of my existing statement to
include the workbook! I will try it - and I'm humbled by its simplicity! I wasn't sure if I had to use properties to control the macro itself, saying that it should only apply to New CU.xls (and not Error CU.xls) THANK YOU. Now... what might you offer me about this secondary sheet and the control issue. For example, I want it to take control to display an alert like "Station 1 Down" - then throw focus back to "New CU" until the cell reference updates it to clear. When it clears, I want it to regain control, clear the message and relinquish focus again. Does that make sense? faureman wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not quite sure exacly what you are trying to do.
You might want to look at using activate instead of select. "faureman via OfficeKB.com" wrote: In essence, simply open up the select part of my existing statement to include the workbook! I will try it - and I'm humbled by its simplicity! I wasn't sure if I had to use properties to control the macro itself, saying that it should only apply to New CU.xls (and not Error CU.xls) THANK YOU. Now... what might you offer me about this secondary sheet and the control issue. For example, I want it to take control to display an alert like "Station 1 Down" - then throw focus back to "New CU" until the cell reference updates it to clear. When it clears, I want it to regain control, clear the message and relinquish focus again. Does that make sense? faureman wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
control end in a macro | Excel Worksheet Functions | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
how to identify the control that ran a macro? | Excel Programming | |||
Which control caused the macro to run? | Excel Programming | |||
Macro control | Excel Programming |