Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2006

Tip: Looking for answers? Try searching our database.

how to select a sheet by name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jzhao7@gmail.com - 20 Sep 2006 16:51 GMT
Hi guys,

How can I go to a sheet by name, for example

I have a=0 (a is a string, not integer) and a sheet named 0. How can I
select the sheet using variable a?

Thanks for the help!

J. Zhao
Gary Keramidas - 20 Sep 2006 16:55 GMT
Worksheets("0").Activate

Signature

Gary

> Hi guys,
>
[quoted text clipped - 6 lines]
>
> J. Zhao
John Fuller - 20 Sep 2006 17:39 GMT
Not sure exactly what you're doing, but this will work as well as what
Gary wrote:

a = "0"
Worksheets(a).Activate

The quotes around the 0 are important!

> Worksheets("0").Activate
>
[quoted text clipped - 12 lines]
> >
> > J. Zhao
Bob Phillips - 20 Sep 2006 17:53 GMT
Worksheets(a).Activate

Signature

HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> Hi guys,
>
[quoted text clipped - 6 lines]
>
> J. Zhao
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.