Page 170 - IT_V1.0_Class10
P. 170
Notes
When a document is created and saved, it automatically contains a library named Standard. The Standard
library is automatically loaded when the document is opened. No other library is automatically loaded.
Storing a Macro Internally
When macros are created in Calc, Calc stores the commands in the form of a code. When a macro is run, Calc
executes this code to run the actions saved by the user.
The user can view the command file by following these steps:
Step 1: Click on Tools menu.
Step 2: Click on Macros option.
Step 3: Click on Organize Macros option from the sub-menu.
Step 4: Click on Basic option.
Step 5: The Basic Macros dialog box will appear on the screen. Click on the macro name.
Step 6: Click on the Edit button. 1
A code window will appear on the
screen where the code for the macro
can be seen. Note that each macro
starts with the keyword Sub and
ends with the keyword End Sub.
Making Macro to Work as a
Function
Following are the steps to create a
simple macro function are as follows:
Step 1: Create a new spreadsheet.
Step 2: Select the Tools Macros
option from the menu bar. 2
3
Step 3: Select the Organize Macros
Edit Macros option from 4
the submenu.
The Macro code window
opens.
Step 4: Create an empty line before Sub and End Sub.
Step 5: Write the given code in the code window:
Function DisplayData()
DisplayData()=″Hello World!!!″
End Function
Step 6: Press Ctrl + S shortcut key from the keyboard or click on Save button on the Standard toolbar to
save the changes in the code window.
168 Information Technology Play (Ver 1.0)-X

