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


Hi,

Perhaps a silly question but I was just wondering what is th
difference between something like:

range("A2").select

and

range("A2").activate

?

And in what situations would you want to use either one?

Thanks for your help

Hele

--
Darlajan
-----------------------------------------------------------------------
Darlajane's Profile: http://www.excelforum.com/member.php...fo&userid=1532
View this thread: http://www.excelforum.com/showthread.php?threadid=27773

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Difference between Select and Activate

There isn't any difference with a single cell range.

But you could use

Range("A1:A10").Select
Range("A2").Activate

to select A1:A10, with A2 being the activecell.

Using:

Range("A1:A10").Activate

will default to A1 being the activecell.

There is rarely a need to select or activate a range to use it in VBA.

HTH,
Bernie
MS Excel MVP

"Darlajane" wrote in message
...

Hi,

Perhaps a silly question but I was just wondering what is the
difference between something like:

range("A2").select

and

range("A2").activate

?

And in what situations would you want to use either one?

Thanks for your help

Helen


--
Darlajane
------------------------------------------------------------------------
Darlajane's Profile:

http://www.excelforum.com/member.php...o&userid=15326
View this thread: http://www.excelforum.com/showthread...hreadid=277730



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Difference between Select and Activate

Range("A1:B9").Select
Range("A2").Activate

Results is A1:B9 is selected and A2 is the active cell

Range("A1:B9").Select
Range("A2").Select

Results is A2 is the single cell selected (and is the active cell).

If A2 is not in the current selection then

Range("A2").Select
Range("A2").Activate

are the same.

as are

Range("A1:B9").Select
Range("A1:B9").Activate

--
Regards,
Tom Ogilvy

"Darlajane" wrote in message
...

Hi,

Perhaps a silly question but I was just wondering what is the
difference between something like:

range("A2").select

and

range("A2").activate

?

And in what situations would you want to use either one?

Thanks for your help

Helen


--
Darlajane
------------------------------------------------------------------------
Darlajane's Profile:

http://www.excelforum.com/member.php...o&userid=15326
View this thread: http://www.excelforum.com/showthread...hreadid=277730



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
.Activate vs. .Select in VBA Dave F Excel Discussion (Misc queries) 1 January 24th 07 03:41 PM
select vs activate Ron de Bruin Excel Programming 0 September 9th 04 04:05 PM
select vs activate Chip Pearson Excel Programming 0 September 9th 04 04:02 PM
Difference between .Activate and .Select JMMach, MCSC Excel Programming 3 August 24th 04 05:47 PM
Any difference between Sheets Activate and Select? Don Wiss Excel Programming 1 October 28th 03 12:46 AM


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