Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good evening.
How do I find an Excel Sheet by its name. For example... I have 10 sheets and I want to find one that fits the criteria Name=Date(). |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Depending on your windows setting, you may not be able to name a worksheet based
on the date's value. I use mm/dd/yyyy as my date format. Excel won't allow those slashes in the worksheet name. If I know the format of the date, I can do something like: dim wks as worksheet set wks = nothing on error resume next set wks = worksheets(format(date,"mm-dd-yyyy")) on error goto 0 if wks is nothing then msgbox "not found" else msgbox "Found it" 'then use wks in your following code wks.range("a1").clearcontents 'for example. end if You'll want to match the format you expect, though. "Pedro Miguel C. Silva" wrote: Good evening. How do I find an Excel Sheet by its name. For example... I have 10 sheets and I want to find one that fits the criteria Name=Date(). -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to make find menu on excel work sheet? | Excel Worksheet Functions | |||
How to find which formula in Excel sheet has an invalid reference | Excel Worksheet Functions | |||
How do I repeatedly find text in an Excel sheet? | Excel Worksheet Functions | |||
updated Excel sheet from my sent items and cannot find | New Users to Excel | |||
How can I find automatic links in an Excel-sheet? | Excel Discussion (Misc queries) |