Correction Macro sent via email

capo888

New Member
Joined
Feb 27, 2008
Messages
1
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
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top