coastalman4545
New Member
- Joined
- Jan 31, 2015
- Messages
- 5
Hello and thanks for reading.
I have a dashboard that i made and it has a daily tasks button that goes into my manual calendar that I made and finds "today's" date, goes two rows down and copies the space and pastes it onto my interface page. I will post the macro for it. All I would like to do is learn how to get it to find tomorrow's date and do the exact same thing. Everything else in the code works great, I just need it to find tomorrow's date instead of today. Purpose is I want to know what's tomorrow's tasks. Thanks.
Sub Find_Todays_date() (I have looked and I can't find how to make this look 1 day ahead of today)
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("calendar").Range("A1:G200")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.Copy
Sheets("interface").Select
Range("B3").Select
ActiveSheet.Paste
Else
MsgBox "Nothing found"
End If
End With
End Sub
I have a dashboard that i made and it has a daily tasks button that goes into my manual calendar that I made and finds "today's" date, goes two rows down and copies the space and pastes it onto my interface page. I will post the macro for it. All I would like to do is learn how to get it to find tomorrow's date and do the exact same thing. Everything else in the code works great, I just need it to find tomorrow's date instead of today. Purpose is I want to know what's tomorrow's tasks. Thanks.
Sub Find_Todays_date() (I have looked and I can't find how to make this look 1 day ahead of today)
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("calendar").Range("A1:G200")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.Copy
Sheets("interface").Select
Range("B3").Select
ActiveSheet.Paste
Else
MsgBox "Nothing found"
End If
End With
End Sub