how to call a dll function in vba 
Author Message
 how to call a dll function in vba

how can i call a dll function in VBA


Sun, 02 Oct 2005 14:14:01 GMT  
 how to call a dll function in vba
Hi rajesh,

Have a look at the examples in the article "How to cut out repetition and
write much less code, by using subroutines and functions that take
arguments" at http://www.mvps.org/word/FAQs/MacrosVBA/ProcArguments.htm

HTH


Quote:
> how can i call a dll function in vba



Sun, 02 Oct 2005 21:24:32 GMT  
 how to call a dll function in vba
D'oh! Sorry, misread your post.


Quote:
> Hi rajesh,

> Have a look at the examples in the article "How to cut out repetition and
> write much less code, by using subroutines and functions that take
> arguments" at http://www.mvps.org/word/FAQs/MacrosVBA/ProcArguments.htm

> HTH



> > how can i call a dll function in vba



Sun, 02 Oct 2005 22:56:38 GMT  
 how to call a dll function in vba
Here is an example:

First you have to declare the function

Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
    "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Boolean

then you call it like it was any other function

    intRet = GetOpenFileName(of)

HTH Lars



Quote:
> how can i call a dll function in vba



Wed, 05 Oct 2005 01:33:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Calling VBA dll functions with C or C++

2. VBA call DLL function

3. Help calling DLL functions from VB/VBA?

4. Calling DLL function from Excel VBA

5. call a dll function in VBA

6. Help calling dll function from VB/VBA?

7. Help calling DLL functions from VB/VBA?

8. Adding VBA function to Visio's VBA Editor from ActiveX DLL

9. WSH calls VBA or VBA calls WSH

10. Create Querydef field that calls VBA function

11. calling a vba function in a form

12. Call Access VBA functions from VB6.0

 

 
Powered by phpBB® Forum Software