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

excel vba declare statement

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel VBA: Declare statement to reference an external procedure

Excel VBA: Declare statement to reference an external procedure

ResolvedVersion 2003

Simon has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Excel VBA: Declare statement to reference an external procedure

Having completed the VBA advanced course, I am gradually getting to grips with inherited code and code that I have plagiarized because it worked, but that I did not really understand.

One example is this

RE: Excel VBA: Declare statement to reference an external proced

Hi Simon

Thank you for your question


This whole topic centres around programming with windows API. This is quiet involved and too big a subject to be given detailed coverage here. To answer your questions

1. GetSystemMetrics32 is an API function that determines the screen resolution. API stands for Application Programming Interface, and is a tool that allows us to view and modify certain windows settings. It comprises a collection of .DLL files.
Thus we are working with the operating system instead of an application.

2. There are a variety of text books that cover the topic. I for instance use "Excel 2003 VBA" , publisher wrox. www.wrox.com , this will give you an idea as to when they can be used.

3. The alias is used at module level to declare references to external procedures in a dynamic-link library (DLL).

4. The & in the variable is part of the naming convention

Hope this is useful

Regards

Stephen

RE: Excel VBA: Declare statement to reference an external proced

Thanks Stephen.

It's useful to know what I don't know, so to speak.

I notice that "Excel 2003 VBA Programmer's Reference" at WROX has a section on API.

Cheers,

S!

 

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:

Use the SUBTOTAL function in Excel

You can create subtotals in your spreadsheet using the SUBTOTAL function, which looks like this:

=SUBTOTAL(9,cell:cell)

9 represents the function being used (SUM), followed by the range of cells the function is operating on.

The neat thing about using the Subtotal function is that if you have used it several times in the same column or row, clicking on the AutoSum button at the end of the column or row will make Excel add only the results of cells containing the Subtotal function in that column or row.

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.09 secs.