ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select OR Activate ? Which when and Why? (https://www.excelbanter.com/excel-programming/381263-select-activate-when-why.html)

Buffyslay

Select OR Activate ? Which when and Why?
 
Select OR Activate ? Which when and Why?

i have never been able to work out when i should select and when i
should activate when using vba - does anyone have a good explanation?


Bob Phillips

Select OR Activate ? Which when and Why?
 
Select can be multiple cells, but only one is active.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Buffyslay" wrote in message
ups.com...
Select OR Activate ? Which when and Why?

i have never been able to work out when i should select and when i
should activate when using vba - does anyone have a good explanation?




merjet

Select OR Activate ? Which when and Why?
 
I suggest searching this newsgroup for "select versus activate" or
"select vs activate".

Merjet


Jim Rech

Select OR Activate ? Which when and Why?
 
Sub a()
Range("A1:C5").Select
Range("B2").Activate
End Sub


--
Jim
"Buffyslay" wrote in message
ups.com...
| Select OR Activate ? Which when and Why?
|
| i have never been able to work out when i should select and when i
| should activate when using vba - does anyone have a good explanation?
|



Don Guillett

Select OR Activate ? Which when and Why?
 
Usually not necessary or desirable

range("a2:a33").copy range("b3")

--
Don Guillett
SalesAid Software

"Buffyslay" wrote in message
ups.com...
Select OR Activate ? Which when and Why?

i have never been able to work out when i should select and when i
should activate when using vba - does anyone have a good explanation?




Chip Pearson

Select OR Activate ? Which when and Why?
 
A Selection may contain one or more cells. Activate makes exactly one of
those cells active. E.g,


Sub AA()
Range("A1:A10").Select
MsgBox "Note the ActiveCell: (A1)"
Range("A5").Activate
MsgBox "Note the ActiveCell: (A5)"
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Buffyslay" wrote in message
ups.com...
Select OR Activate ? Which when and Why?

i have never been able to work out when i should select and when i
should activate when using vba - does anyone have a good explanation?





All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com