Getting started

Record a macro
To edit in VBA, you can record a macro
View->Macro
Record a macro - do some stuff that you need done and automated
Give it a name
Stop recording
View->Macro
Step into code

You can also edit in VBA editor
One a PC:
Alt+F11

In Macbook:
Go to preferences ->  ribbon -> developer tab
Add visual basic editor to the ribbon
You should spot the visual basic icon at the top with the save icon

Here is how to write your first macro
In the VBA editor, type:

Sub NameOfMacro()

End Sub

To run it, either press F5 or click on the 'Run' button (the one shaped like a play button).

When saving the macro, you can save it in a way that it is able to run on another computer
Type your code.
Add a button in the ribbon and a shortcut key to run your macro.
Save the file as a .dotm file.


Comments

Popular posts from this blog

Find and replace

Menus and toolbars

Formatting