Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Why does Sheet.Range("A1").Select not work!!!

I have set all my worksheets as Worksheet objects, and I am trying to
reference a particular cell/range, but the code always bombs out with
a "Select method of Range class failed"...

the line is...

WSStats.Range("A1").Select

Why will this not work?

This works...

WSStats.Activate
Range("A1").Select

But I don't want to "Activate" the worksheet in order to reference the
said cell.

Am I missing something?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Why does Sheet.Range("A1").Select not work!!!

You didn't show all of your code so

To SELECT (what you said) you do need to activate after activating the
desired sheet.
application.goto WSStats.Range("A1")
would have worked but to reference withOUT selecting

WSStats.Range("A1").copy range("a1")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DemonTraitor" wrote in message
...
I have set all my worksheets as Worksheet objects, and I am trying to
reference a particular cell/range, but the code always bombs out with
a "Select method of Range class failed"...

the line is...

WSStats.Range("A1").Select

Why will this not work?

This works...

WSStats.Activate
Range("A1").Select

But I don't want to "Activate" the worksheet in order to reference the
said cell.

Am I missing something?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Why does Sheet.Range("A1").Select not work!!!

Hi Demon

You can't select a cell on a sheet that is not active
Why do you want to select the cell?

You can always use this to avoid the error

Application.Goto WSStats.Range("A1"), True



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"DemonTraitor" wrote in message ...
I have set all my worksheets as Worksheet objects, and I am trying to
reference a particular cell/range, but the code always bombs out with
a "Select method of Range class failed"...

the line is...

WSStats.Range("A1").Select

Why will this not work?

This works...

WSStats.Activate
Range("A1").Select

But I don't want to "Activate" the worksheet in order to reference the
said cell.

Am I missing something?

Thanks

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
Range("Reset Sheet!F13").Select Makes VBA Code Fail ToferKing Excel Programming 3 July 11th 07 04:18 AM
Range("A1").select doesn't work! pianoman[_23_] Excel Programming 2 May 25th 06 02:08 PM
Why doesn't 'Range("A65000").Select' work? Alan[_36_] Excel Programming 6 January 23rd 06 12:19 AM
Excel macro convert to VBA - doesn't work, hangs on Range("Q35").Select Harold Good Excel Programming 3 January 13th 06 09:09 PM
This does not work: Range("A1").Select Bob Excel Programming 2 December 16th 03 08:39 PM


All times are GMT +1. The time now is 12:28 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"