Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
I have sheet tabs that are named by the year (i.e. New Report, 2011, 2010 2009, etc). The code below displays the sheet tabs in the combo (which works fine). But, Instead of "New Report" being an option to select, I would like to display the next consecutive year. (i.e. 2012). Will someone assist. Thanks
Code:
Private Sub cboYear_Enter()
Dim Sh As Worksheet
If EE Then Exit Sub
EE = False
With cboYear
For Each Sh In ActiveWorkbook.Sheets
If ((Sh.Name <> "Security") And (Sh.Name <> "f2106")) Then
.AddItem Sh.Name
End If
Next
End With
EE = True
End Sub