VBA Lesson 15: VBA for Excel for Worksheets
This is an excerpt from Pierre Leclerc (www.excel-vba.com)
To develop a VBA procedure that is triggered by an event relating to the worksheet (when you select it, when you leave it...) see the VBA lesson on events.
You access a worksheet named " Balance" with:
You cannot select a sheet that is hidden so you will need to write:
The name of a sheet must not have more than 31 characters and should not include certain special characters like " ? : \ / [ ]" . If you do not respect these rules your procedure will crash.
The following lines of code will generate an error message:
You can not go directly from a sheet to a cell on another sheet. For example if the active sheet is "Balance" and you want tot go to cell A1 of a sheet named " Results" you cannot write:
Go to the next lesson