Using Spreadsheet Functions in VBA Code

Problem

You're writing a VBA function and want to call a built-in Excel function from within VBA code.

Solution

Use the WorksheetFunction object to gain access to Excel's functions from within VBA code. Read Recipe 2.13 for more information on the WorksheetFunction object.

Категории