Thread: Run Macros
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Vacuum Sealed Vacuum Sealed is offline
external usenet poster
 
Posts: 259
Default Run Macros

I'm no Guru, although in your OP you stated that the routine work fine, and
as you have only posted snippets, it is hard to work out what is happening,
for instance, these macro's appear as though they have been done via Macro
Recording and not done manually.

I cannot see any declarations or references as to what type, be it String,
Variable, UDF, or whatever you are defining, plus I don't know why you have
so many CutCopyMode references.

One of the many way-more talented NG contributors may have a better layout
to suggest, in the meantime you could try it this way and see if it
improves.

Sub Macro126()

With Application
.ScreenUpdating = False
End With

Range("B2:G136").Select

With Selection
.ClearContents
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
End With

Sheets("Overall Scores").Select

Range("B2:G136").Select
Selection.Copy
Sheets("Sheet3").Select
Range("A4").Select
ActiveSheet.Paste
Application.CutCopyMode = False

Call Macro128

End Sub


Sub Macro128()
'
' Macro128 Macro
'
Application.DisplayFullScreen = True
ActiveWindow.ScrollRow = 4
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 18
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 33
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 48
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 63
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 78
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 93
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 108
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 123
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 138
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveWindow.ScrollRow = 1

With Application
.ScreenUpdating = True
End With

End Sub