I am trying to enter days of the week each time i press button new day this code has error
user defined type not defined can you help?
[vba]
Private Sub CommandButton1_Click()
Dim i As Long
Dim Count As Long
Count = 1
For i = 2 To 65536
If Cells(i, 1) <> "" Then
Count = Count + 1
End If
Next i
Dim day As day
day = Cells(Count, 1).Value
day = day + 1
'Days of the week Monday to Friday
Sheets("Sheet5").Cells(1, 1)(Rows.Count, "D").End(xlUp).Offset(1).Value = day
End Sub
[/vba]