Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range.Select

I understand that it is best practice to never use Range.Select in
Excel VBA as it will often throw up bugs. I have found several examples
for this from trawling the groups and it has happened to me several
times when developing.

However, i am at a loss trying to understand where the problem lies.
Can anyone tell me what causes the bug?

If you need a specific example i can try and create one.

Many thanks

Dan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range.Select


Hi Dan,

I'm working with Excel for many years now and I have never heard of
that problem / bug. In al my spreadsheest I use it, but never direct: I
use names in stead.

John.


--
jgmiddel
------------------------------------------------------------------------
jgmiddel's Profile: http://www.excelforum.com/member.php...o&userid=32714
View this thread: http://www.excelforum.com/showthread...hreadid=527197

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Range.Select

I've never considered it a bug in excel--but I do consider it a bug in the code.

If you try to select a range that isn't on the activesheet, you'll get an
error. So you'll want to make sure you activate the correct workbook, then
select the correct sheet, then select the range (or use application.goto that
does this all at once).

Not a bug issue, but I've always found range.select followed by
selection.somethingoranother much more difficult to understand/maintain.

wrote:

I understand that it is best practice to never use Range.Select in
Excel VBA as it will often throw up bugs. I have found several examples
for this from trawling the groups and it has happened to me several
times when developing.

However, i am at a loss trying to understand where the problem lies.
Can anyone tell me what causes the bug?

If you need a specific example i can try and create one.

Many thanks

Dan


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range.Select

Many thanks for that, i think it was the activesheet issue you refer
to.

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
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
select range and put range address in variable [email protected] Excel Programming 2 January 25th 06 01:28 AM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 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 07:19 AM.

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"