VBA code to select particular tab.... [Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hi

does anyone know the vba code to find particular tab if it is todays date.

e.g. i have a list of tabs on a spreadsheet dated from 1st to 31st, but only the numbers are shown, the month and year is not.

I need to know how i can open the spreadsheet and then and search and select the tab with todays date and paste information into it.

Hope someone can help!

Thanks in advance


Excel 2003

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
dim dt as string

' if dates/sheet names are like 01, 02 03.. then use "dd" instead of "d"
dt = format(date, "d")


sheets(dt).select

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!