By example, the following code works in a VB module, but I can't use it in a VBScript.
The error always occurs during the declaration of the API:
- Line : 3
- Caract : 17
- Code : 800A0401
- Source : Compilation Error
Private Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String)
VBScript doesn't support API calls, you have to create an ActiveX component that does the actual calls. You may find several such scripting "helper" components on the web.
You can also create your own API-interface components using VB. VB5 Control Creation Edition is a great option for those who don't have VB5 or VB6. See
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.