KennethLeidner
New Member
- Joined
- Feb 1, 2018
- Messages
- 1
Found the book in the library. The part about cleaning up recorded code is great. I really like the how to find the last row, one line solution vs the recorder's code.
I also like that you talked about both sides of the "Force defining variables or not". I started out not defining variable, but have changed to defining them. Not for discovering using two name for the same variable (LastRow vs lastrow), but for not having everything being the default Variant.
I do have a question about defining variables. I recently heard to put the dim statement right before the first usage, rather than at the top of the code. Your thought? Mine is its a bad idea. Reason; when I am down in the code say at the nth usage of the variable I'll never be able to find the Dim statement. How do I know where the first usage is in the code. However it did get me to wonder if maybe I should alphabetize the Dim statements. Well not completely but maybe by first letter of the variable's name.
One last comment. I already new about using arrays rather than cells reference to speed up the code, it makes a phenomenal difference. Bold the text about that!!
I also like that you talked about both sides of the "Force defining variables or not". I started out not defining variable, but have changed to defining them. Not for discovering using two name for the same variable (LastRow vs lastrow), but for not having everything being the default Variant.
I do have a question about defining variables. I recently heard to put the dim statement right before the first usage, rather than at the top of the code. Your thought? Mine is its a bad idea. Reason; when I am down in the code say at the nth usage of the variable I'll never be able to find the Dim statement. How do I know where the first usage is in the code. However it did get me to wonder if maybe I should alphabetize the Dim statements. Well not completely but maybe by first letter of the variable's name.
One last comment. I already new about using arrays rather than cells reference to speed up the code, it makes a phenomenal difference. Bold the text about that!!