MrExcel Publishing
Your One Stop for Excel Tips & Solutions


Posted by jo on December 20, 2001 8:14 AM

I am very new to Excel & have never used a Macro. I would like to know if there is a place that gives step by step instructions on Macros.

Posted by Joe Was on December 20, 2001 9:25 AM

No. Excel help will tell you the steps to record a macro, but is no help on basic steps. Excel help only gives snippets of code for each specific method or function.

Also there is i difference between how Excel 95 and newer versions of Excel place code. Some code go's in a module level and other in the sheet level and at times each may have other levels such as the forms level.

The best way to learn is to spend a lot of time learning what it takes to make a modification to a code sample to make it work the way you want.

The record macro is a good way to get to know how to get a specific function or method to work on specific data and cells. The problem is the recorder will not set up code to be universal and it includes parts you don't need. A simple way to change recorded macros from a specific level to a universal level of code is to take out the Range code and replace it with selection code. That way what ever you select with the mouse will be acted upon by your macro, not just the hard coded range the recorder put in. JSW

Posted by Mark O'Brien on December 20, 2001 9:28 AM

A brief guide is given on this very site. Have a look at these:

They cover the basic use of a macro. I would also suggest a trip to the library and have a look for books in the computer section on Excel VBA. Your best bet is to find a book that works through a small Visual Basic project step-by-step.

I wouldn't suggest buying a book outright because I've seen some really terrible books that were supposed to be aimed at Beginners.

Also, once you understand the basics of how macros are recorded and where they are stored, people on this message board are typically very good at offering solutions to small (and sometimes big) problems.

Hope this helps.