This video shows how to use the Macro builder to make your code.
Go to View then Macros then Record macro.