View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Object required error

Removing the .value and it works (not sure why..)
--
Wag more, bark less


"Brad" wrote:

Below is my macro - why am I getting an object required error?

Sub HolidaySelection()
Dim i As Long
Dim j As Long
Range("startpoint").Select
For i = 1 To 12
For j = 1 To 28
If
Application.WorksheetFunction.CountIf(Worksheets(" Holidays").Range("F5:F13").Value, DateSerial(Range("VacYear").Value, i, j)) Then
ActiveCell.Offset(i, j) = "H"
End If
Next j
Next i
End Sub