Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I learn about VBA 1

Status
Not open for further replies.
Feb 12, 2001
52
GB
I am very keen to learn how to use VBA, in particular with Excel. I have just purchased "Writing Excel Macros" by Steve Roman but find it a bit difficult to follow. Can anyone recommend a book or method that could apply to someone like myself who needs simple explanations and is not involved in the programming world.
 
Hi,
The best books that I have found have been by Walkenbach.
But there is a wealth of info right in Excel VBA. Try recording a macro, like cut and paste. Then go the the VBE (alt+F11) and open the module and see what happened. For an example like this, you might see...
Code:
    Range("C6").Select
    Selection.Cut
    Range("E7").Select
    ActiveSheet.Paste
Try changing the code and running the macro and see what happens. You could accomplish the same thing and have better code like this...
Code:
    Range("C6").Cut
    Range("E7").Select
    ActiveSheet.Paste
See what happens if you changed it to...
Code:
    Range("C6").Cut
    Range("E7").Paste
Errors can be instructive too.
Look in VBA Help for Cut, Paste, Range, Selection, Select and ActiveSheet. See what Also See references. Look at the help examples. Begin to understand what words are Objects and what are Methods. For instance, Range is an Object and Cut is a Method. Selection is an Object and Select is a Method. Play around with VBA. Use Help. Ask Questions. Look at other Q & A posted here.

Remember; everyone of us started at some time with little or no knowledge of VBA. One step at a time. :) Skip,
metzgsk@voughtaircraft.com
 
Thanks Skip for your prompt reply. I will certainly go along with what you suggest. Do you know how I can get lists of common Objects and Methods and any othere keywords that are used?
 
I do not know of a comprehensive list. You are just going to have to mine help.
Good luck! Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top