Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Macro Control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro Control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Macro Control

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
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
control end in a macro Belinda7237 Excel Worksheet Functions 1 May 28th 08 05:22 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
how to identify the control that ran a macro? Andy Warner Excel Programming 5 April 20th 06 03:07 PM
Which control caused the macro to run? josa01 Excel Programming 4 October 10th 05 02:07 PM
Macro control Edwin Merced Excel Programming 4 December 5th 03 12:58 AM


All times are GMT +1. The time now is 10:27 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"