Macro triggered by date
Tried to setup the month of February. Here is my macro;
Private Sub Workbook_Open()
If Day(Date) = 39479 Then
' FixFeb Macro
' Macro recorded 18/01/2008 Fixes Feb formula to values
'
'
Sheets("Feb Accounts").Select
ActiveWindow.SmallScroll Down:=-27
Range("D9:D177").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("F9:F177").Select
Range("F177").Activate
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("G9:H9").Select
End Sub
Basically I want to tell it that if it is Feb 1, to copy paste two columns
of data as values. That's it.
With this macro, I get an error. It says"Compile error: Block If without
End If"
Any ideas?
|