View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Windows API Functions

You have a typo in GetWindowsDirectoyA , missing an"r" before the "y"

Public Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" ( _
ByVal lpBuffer As String, _
ByVal nSize As Long) As Long

Although not necessary, to adhere to convention you might copy the API as
written above (line breaks optional)

Regards,
Peter T



"LesHurley" wrote in message
...
I have copied the following declaration and an accompaning function call

from
Walkenbach"s p\Power Programming With VBA.

Declare Function GetWindowsDirectoyA Lib "Kernel32" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long

I get the runtime error "Can't find DLL entry point GetWindowsDirectoryA

in
kernel32.

I am using WindowsXP home ed. Does anyone know if XP has that function?

--
Thanks for your help