Open Month Tab based on current month

mikeannetta

New Member
Joined
Oct 6, 2015
Messages
15
Office Version
  1. 2019
Platform
  1. Windows
I wish to have the ability to open a workbook based on current month. Whether is macro after I open the Workbook, or a something I can put in the VBA Project "This Worksheet"?
I have the TABS Named ( January, February, March ...) along with other names including, Dash Board, Up to Date. So when I open the file on February 15, it will open the file directly to the Tab named "February"

Thanks for the help from the group!
 
Put the following in thisworkbook events

VBA Code:
Private Sub Workbook_Open()
  Dim m As String
  m = Format(Date, "mmmm")
  On Error Resume Next
  Sheets(m).Select
End Sub

- Open the VB Editor (press Alt + F11).
- Over in the Project Explorer, double click on ThisWorkbook.
- In the white panel that then appears, paste the above code.
 
Upvote 1
Solution

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top