Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

how do i

ResolvedVersion 2003

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

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Using basic functions without doing formulas

When you highlight figures Autocalc tells you the total in the bottom right of the screen, but if you right click on the sum it will give you some basic functions. The functions are Min, Max, Average, Sum, Count, and Count Nums.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.