Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding Worksheet Name

Also try this:

Worksheets(myVar & "_" & Format(Year(myDate),"yyyy")).Selec

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding worksheet I saved over. Linda New Users to Excel 3 May 22nd 08 12:40 AM
Finding Data in a worksheet Roxy Excel Discussion (Misc queries) 1 April 21st 08 10:12 PM
Finding the number of a worksheet GeorgeJ Excel Discussion (Misc queries) 2 July 27th 07 09:02 PM
Finding Worksheet and Activating it Rob Excel Discussion (Misc queries) 2 January 30th 07 08:14 PM
finding the last row in another worksheet edg Excel Worksheet Functions 2 November 11th 06 10:03 AM


All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"