excel vba declare statement
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

resolvedResolved · Low Priority · Version 2003

replyReply Thu 21 May 2009, 12:20Delegate Simon said...

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

For upcoming training course dates see: Pricing & availability

replyReply Tue 26 May 2009, 10:11Trainer Stephen said...

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

replyReply Wed 27 May 2009, 00:25Delegate Simon said...

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!

 

Please browse our web site to find out more about
microsoft excel course and other Microsoft training courses.

Excel tip:

Move to edge of data block

When data is held in a block, however large, use the Ctrl key with your cursors to move quickly to the far edge of the block. Works with all 4 direction keys.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard