J
jambun
I have 2 Macros, I want to make a macro that will run Macro 126 which
clears all information on current worksheet then goes to worksheet
"Overall Scores", Selects the range B2 to G136, returns to current
worksheet and pastes the copied information. This works fine.
In Macro 128 the scores are then scrolled up the page, this works fine
BUT, I cannot get both macros to work together! Any ideas?
Thanks
EPJ
Sub Macro126()
'
' Macro126 Macro
'
'
Application.ScreenUpdating = False
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Sheets("Overall Scores").Select
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
Range("A4").Select
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
End Sub
clears all information on current worksheet then goes to worksheet
"Overall Scores", Selects the range B2 to G136, returns to current
worksheet and pastes the copied information. This works fine.
In Macro 128 the scores are then scrolled up the page, this works fine
BUT, I cannot get both macros to work together! Any ideas?
Thanks
EPJ
Sub Macro126()
'
' Macro126 Macro
'
'
Application.ScreenUpdating = False
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Sheets("Overall Scores").Select
Range("B2:G136").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
Range("A4").Select
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
End Sub