Phil has attended:
Excel VBA Intro Intermediate course
How do i
contruct something like a DSUM in VBA - is it possible to perform such a complicated table
DSUM Function in VBA
Hi Phil
To use one of the Excel functions like DSUM, you need to create a variable to store the DSUM value. The variable type must equal the type of data being returned (In this case Single or Double).
The code would be:
Dim MyDSumValue As Single
MyDSumValue = Application.WorksheetFunction.DSum(Database, Field, Criteria)
Hope this helps
Carlos