View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John Fuller John Fuller is offline
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