![]() |
Activate and Select range/worksheet
Could someone kindly explain or refer me to some sources where I can
distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 |
Activate and Select range/worksheet
You can find some verbage on it in the VBA help files, in the VBA documentation
for Excel. Look for selecting and activating. Basically, you can Activate a cell within a selection. When you select a sheet, range or object you activate it. So activate and select can be used interchageably on most objects. "zhj23" wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 |
Activate and Select range/worksheet
Select A1:B3
then use the tab to activate each cell in the selection. The activecell is changes with each strike of the tab key. The selection doesn't change. Create a test workbook with a handful of worksheets. Click on the first worksheet and ctrl-click on subsequent sheets. You've selected a few sheets. In that set of selected sheets, you can activate any one you want. Not too dissimilar to the cells in the range. zhj23 wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 -- Dave Peterson |
Activate and Select range/worksheet
Welcome to the club. I've read a couple small books about VBA, the help
files, and quite a bit on here. I've worked with 4 or 5 programing languages, in fact I first learned Basic when it was developed at Dartmouth and you had to get up at 3 in the morning to have your cards run through the reader and it spit out a bunch of errors. It just looks to me like some half drunk committee sat down and decided to develop the most confusing and misleading language possible in VBA. There is no particular syntax or structure to it. There is no particular way to do anything... there are 8 or 9 ways and 10 to 20 different names for them. It is like an example of exactly how not to develop a programming language. The only good news is that it meshes with Office products pretty well. You will find the same sort of confusion in terminology and description time and time again if you delve deeper into VBA... It's endless. John zhj23 wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 |
Activate and Select range/worksheet
Good explanation!!
You mean we can only activate "a" cell and CANNOT activate "a range"? Range CAN only be "selected" and not "activated"? zhj23 "Dave Peterson" wrote: Select A1:B3 then use the tab to activate each cell in the selection. The activecell is changes with each strike of the tab key. The selection doesn't change. Create a test workbook with a handful of worksheets. Click on the first worksheet and ctrl-click on subsequent sheets. You've selected a few sheets. In that set of selected sheets, you can activate any one you want. Not too dissimilar to the cells in the range. zhj23 wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 -- Dave Peterson |
Activate and Select range/worksheet
Thanks for the good entertainment.
I have also gone through that experience of punching several holes on the cards, only to be thrown out later 30 years ago. Looks like we have also to be half-drunk before we can fully understand the VBA language. Cheers!! zhj23 "John" wrote: Welcome to the club. I've read a couple small books about VBA, the help files, and quite a bit on here. I've worked with 4 or 5 programing languages, in fact I first learned Basic when it was developed at Dartmouth and you had to get up at 3 in the morning to have your cards run through the reader and it spit out a bunch of errors. It just looks to me like some half drunk committee sat down and decided to develop the most confusing and misleading language possible in VBA. There is no particular syntax or structure to it. There is no particular way to do anything... there are 8 or 9 ways and 10 to 20 different names for them. It is like an example of exactly how not to develop a programming language. The only good news is that it meshes with Office products pretty well. You will find the same sort of confusion in terminology and description time and time again if you delve deeper into VBA... It's endless. John zhj23 wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 |
Activate and Select range/worksheet
Mostly, I agree with you. If the range is exactly one cell, then I don't see a
difference. But technically, you can activate a range: This won't fail in code: Range("a1:b3").Activate So you can activate a range. zhj23 wrote: Good explanation!! You mean we can only activate "a" cell and CANNOT activate "a range"? Range CAN only be "selected" and not "activated"? zhj23 "Dave Peterson" wrote: Select A1:B3 then use the tab to activate each cell in the selection. The activecell is changes with each strike of the tab key. The selection doesn't change. Create a test workbook with a handful of worksheets. Click on the first worksheet and ctrl-click on subsequent sheets. You've selected a few sheets. In that set of selected sheets, you can activate any one you want. Not too dissimilar to the cells in the range. zhj23 wrote: Could someone kindly explain or refer me to some sources where I can distingush between "activation" and "selection" of ranges? and worksheets? I am quite confuse with the two concepts. Thanks. zhj23 -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com