You don't have to scroll down if you sort the list with the latest sheet on top.
You could also consider to select the item that matches today's date, because I assume that sheet will be needed most.
The advantage of this approach compared to the use of a datepicker is that only available sheets will be shown in the listbox. So it's not possible to select a non-existing sheet. The datepicker approach would require all sorts of checks & messages if a sheet doesn't exist.Code:Private Sub Workbook_Open() c00 = [text(today(),"'ddd, mmm dd, yyyy'")&"!A1"] If Not Evaluate("isref(" & c00 & ")") Then Sheets.Add.Name = [text(today(),"ddd, mmm dd, yyyy")] For Each sh In Sheets If InStr(sh.Name, ",") > 0 Then c01 = c01 & vbLf & sh.Name Next Sheets("index").ListBox1.List = Split(Mid(c01, 2), vbLf) Sheets("index").ListBox1.Value = [text(today(),"ddd, mmm dd, yyyy")] End Sub




Reply With Quote
Bookmarks