nniedzielski
Well-known Member
- Joined
- Jan 8, 2016
- Messages
- 598
- Office Version
- 2019
- Platform
- Windows
I have a workbook where I have worksheets that are titled by date in this format: "14-Dec"
I am able to use this code to find todays date:
and I use these to go back a day or forward a day from todays date:
Is there a way to go forward or backwards multiple days by using a -2 or a +2 anywhere in the line of code? Ideally I would like to be able to find the sheet for today and go back 5 days.
thank you,
I am able to use this code to find todays date:
Code:
Worksheets(Format(Date, "dd-mmm")).Select
and I use these to go back a day or forward a day from todays date:
Code:
ActiveSheet.Next.Select
ActiveSheet.Previous.Select
Is there a way to go forward or backwards multiple days by using a -2 or a +2 anywhere in the line of code? Ideally I would like to be able to find the sheet for today and go back 5 days.
thank you,