Help fix macro
Posted by Ken on December 21, 2001 7:59 AM
Hi all,
I am just learning VBA and want to copy the value in cell B1 to cell C1 if the value in cell A1 equals todays date. Here is the macro I tried to write.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Sheets("Sheet1").Range("A1").Value = Now Then
Range("B1").Copy
Range("C1").PasteSpecial (xlPasteAll)
Else: Exit Sub
End If
End Sub
Thank you
Ken