View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Finding Worksheet Name

Worksheets(myVar & "_" & Year(Date)).Activate

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Lenny" wrote in message
...
Hi all, I have a question that I hope someone can help me with.
I'm on an company intranet which has a sharedrive. Every month there is a

excel spreadsheet created with safety data. I have another worksheet with VB
code that extracts the date into a 3 letter format (i.e, Apr.) which I put
into a variable. My question is how do I open another workbook which has
worksheet with (i,e., Apr_2004) as one of the 12 months in it. I can open
the workbook but I need to know how to select the worksheet based on my
variable which contains the(Apr) name that I'm looking for.

Thanks,
lenny