Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with 1 line of code...worksheet reference

Status
Not open for further replies.

ckhunley

Technical User
Jul 26, 2004
33
0
0
US
I can't seem to figure out what is wrong with this line of code, I get a multitude of errors depending on what changes I make. The one I am getting with this specific syntax is "Select method of range class global failed"

Worksheets("" & hydraulics.actoggle.Value).Range("B65536").Select

When I move the mouse over the hydraulics.actoggle.Value it shows that the value is "Toggle 2" which is the name of the worksheet I am trying to get to. Any help would be appreciated.
Thanks,
Chris
 
Hi
Try
Worksheets(hydraulics.actoggle.Value).Activate
Range("B65536").Select

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Perfect, thank you very much. I knew it would be something somple like that, but couldn't quite stumble onto it.
Thanks,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top