duskwood47
New Member
- Joined
- Oct 9, 2017
- Messages
- 28
Ok so what I would like to do is create a macro that will allow me to create one specific spin control button that will increment a specific cell by one but that specific cell would be specified based on what time and what day it is.
I know I could use
Sub IncrementonFirst()
Dim MyDate As Date, MyDay As Integer
MyDate = Now
MyDay = Day(MyDate)
'establish the date and day
With ThisWorkbook.Worksheets("Sheet1")
If MyDay = 1 Then _
.Range("A1").Value = .Range("A1").Value + 1
End With
End Sub
To do it for the day and use a CASE SELECT or IF THEN ELSEIF for the days but Im not sure how to add in the time factor.
Any help would be appreciated.
I know I could use
Sub IncrementonFirst()
Dim MyDate As Date, MyDay As Integer
MyDate = Now
MyDay = Day(MyDate)
'establish the date and day
With ThisWorkbook.Worksheets("Sheet1")
If MyDay = 1 Then _
.Range("A1").Value = .Range("A1").Value + 1
End With
End Sub
To do it for the day and use a CASE SELECT or IF THEN ELSEIF for the days but Im not sure how to add in the time factor.
Any help would be appreciated.