LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA: Select Excel's Worksheet using wildcard

Hi guys,

Sorry for the long post.

I'm having problem using wildcard to select the appropriate worksheet
in Excel.

This is what I have in the workbook.

In 1 workbook, I have 3 different worksheets and they are namely:

1. Week ABC
2. Week DEF
3. Week GHI

Say if I want to select the worksheet: 'Week ABC', I use either one of
the following codes to open the desired worksheet:

1. Sheets("Week A??").Select
2. Sheets("Week AB?").Select
3. Sheets("Week A*").Select
4. ..... and etc.

When I execute one of the aboved codes in VBA, I keep getting the
error: "Runtime error 9: The subscript is out of range."

Could someone please clarify is wildcard supported in the aboved
statements? If no, is there any way I can work around in order to make
it work? I need to automate the process of sheets selection as there
are many values in the sheet to calculate.

Any clue anyone?

Thanks.


Rgds


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

 
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
Can I create a worksheet menu to select each other worksheet pippagrace Excel Discussion (Misc queries) 4 June 23rd 06 01:28 PM
select all worksheets in formula (wildcard) Leif Excel Worksheet Functions 3 May 12th 06 09:52 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Wildcard character with Select Statement Mike Excel Programming 1 December 12th 03 07:21 PM


All times are GMT +1. The time now is 12:14 AM.

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

About Us

"It's about Microsoft Excel"