Hi all,
I wanted to ask, can someone see the error with this code, I keep getting an application error, object not set…..
Thanks,
Darryl.
Option Explicit
Public Function do_the_Birthday() As Integer
Dim count As Integer
Dim i As Integer
Dim bc As Integer
Dim lo As Integer
Dim counthewhat As Range
Dim days As Variant
Set counthewhat = Worksheets(1).Range(Cells(4, 11), Cells(4, 288)) ‘ This is where the error happens.
With counthewhat
days = Application.WorksheetFunction.Sum(counthewhat)
End With
do_the_Birthday = days
End Function