You can learn macro using this http://community.qlik.com/docs/DOC-2640 file in which you can learn qlikview related classes and methods.
Learn about general VBscript for other than this.
I recommend checking the manual to decide where to use the macro.
QlikView Reference Manual.
pag:876 >> 78 Using Automation and Macros with QlikView
QlikView objects are accessible via automation from inside QlikView by means of the built-in scripting
Macros written in VBScript or JScript, inside a QlikView document can be invoked in a number of different ways:Document Events,Sheet Events,Sheet Object Events,Button Events,Field Events and Macro Editor.
I hope this API,QVW will help you to develop a macro. Go to Automation Examples Tab and select an class and according to that selection there is many member are available. Also please select the the member as per class selection, You will get the macro code on the right side.
APIguide.qvw 1.6 MB