Re: Truly Beginners Help Info
Tell your friend to look at
www.mrexcel.com. Bill Jelen (aka Mr Excel) has a VB book or two, and John Walkenbach (
www.j-walk.com) is excellent as well.
In the meantime, one of the best VBA resources is VBA itself, with the macro recorder, which is your friend, and the VB helpfile.
e.g. for Dim look up "Declaring variables", and to figure out what kind of variables you have to play with look up "data types".
In short declaring variables (Dim is the keyword that tells VBA that you're declaring a variable) is good programming practice because you are pre-defining that element. Otherwise VBA has to try to figure out the best thing for your variable at run time, which can slow your code down. It's also an excellent way to catch errors.
E.G. Dim MyName as String
MyName = "Smitty"
I can refer to MyName anywhere in my code, but if I want to change it, I only have to change "Smitty" once, as opposed to trying to find each occurrence of it in my code. Making the change to the variable reference sets the change for all of them.
And don't forget to tell your friend (nudge, nudge, wink, wink) to always ask questions here!
That's what the board's for!
Smitty