Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to select a sheet by name

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default how to select a sheet by name

Worksheets("0").Activate

--


Gary


wrote in message
ups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default how to select a sheet by name

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!

Gary Keramidas wrote:
Worksheets("0").Activate

--


Gary


wrote in message
ups.com...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to select a sheet by name

Worksheets(a).Activate

--
HTH

Bob Phillips

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

wrote in message
ups.com...
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



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
Alternate Row Select in Sheet 1 then Paste to Sheet 2 Steevo Excel Worksheet Functions 4 December 5th 08 06:45 PM
How do I select price from sheet.b where sheet.a part no = sheet.b Sonny Excel Worksheet Functions 4 April 4th 06 05:08 PM
Use of Sheet CodeNames to Select Sheet in Different Workbook Randy[_10_] Excel Programming 10 June 14th 05 04:55 AM
Macro, select Sheet "Number", NOT Sheet Name DAA Excel Worksheet Functions 4 November 30th 04 05:29 PM
Select Sheet then Select Range Gee[_2_] Excel Programming 3 May 27th 04 10:10 PM


All times are GMT +1. The time now is 09:01 PM.

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"