Entering Worksheet functions

You can't use the Excel Paste Function dialog box to insert a worksheet function into a VBA module. Instead, enter such functions the old-fashioned way: by hand. However, you can use the Paste Function dialog box to identify the function you want to use and find out about its arguments.

1. Activate a worksheet.

2. Choose InsertOFunction as you normally would.

3. Figure out how the function works.

4. Type the function and its arguments into your module.

Follow these steps to display the VBE's Auto List Members option, which displays a drop-down list of all worksheet functions:

1. Type Application.WorksheetFunction, followed by a period.

2. If this feature isn't working, choose the VBE's ToolsO Options command.

3. Click the Editor tab.

4. Place a check mark next to Auto List Members.

Was this article helpful?

0 0

Post a comment