I am trying to email a correction macro out to the field; however, I am having trouble getting the macro to work on the open workbook. I recorded the macro in a blank workbook that I plan to send out with the instructions to close all other workbooks except for the one to be corrected. The field is free to save the workbook any filename they want. Any help would be greatly appreciated.
Sub coreeval()
'
' coreeval Macro
'
' Keyboard Shortcut: Ctrl+Shift+Z
'
OpenWorkbook.Activate
Sheets("Instructions").Select
Range("A3").Select
Sheets("Exec Evaluation").Select
Range("A1").Select
Sheets("Evaluation").Select
Range("B1").Select
Sheets("Input").Select
Range("B1").Select
Sheets("Data").Select
Range("A3").Select
Sheets("Exec Evaluation").Select
ActiveSheet.Unprotect
Range("D4:D8").Select
Selection.Copy
Range("E4:N8").Select
ActiveSheet.Paste
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
Range("B1").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Sheets("Instructions").Select
Range("O26").Select
ActiveCell.FormulaR1C1 = ""
Range("P27").Select
ActiveWindow.SmallScroll ToRight:=8
Range("S14").Select
ActiveCell.FormulaR1C1 = "2"
Range("T14").Select
ActiveCell.FormulaR1C1 = "Correction macro 1 ran"
Range("W14").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("W14").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Windows("Book2").Activate
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Macro ran successfully"
Range("E1").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("E1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Sub coreeval()
'
' coreeval Macro
'
' Keyboard Shortcut: Ctrl+Shift+Z
'
OpenWorkbook.Activate
Sheets("Instructions").Select
Range("A3").Select
Sheets("Exec Evaluation").Select
Range("A1").Select
Sheets("Evaluation").Select
Range("B1").Select
Sheets("Input").Select
Range("B1").Select
Sheets("Data").Select
Range("A3").Select
Sheets("Exec Evaluation").Select
ActiveSheet.Unprotect
Range("D4:D8").Select
Selection.Copy
Range("E4:N8").Select
ActiveSheet.Paste
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
Range("B1").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Sheets("Instructions").Select
Range("O26").Select
ActiveCell.FormulaR1C1 = ""
Range("P27").Select
ActiveWindow.SmallScroll ToRight:=8
Range("S14").Select
ActiveCell.FormulaR1C1 = "2"
Range("T14").Select
ActiveCell.FormulaR1C1 = "Correction macro 1 ran"
Range("W14").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("W14").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Windows("Book2").Activate
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Macro ran successfully"
Range("E1").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("E1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub