Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long Dim hMod As Long hMod = GetModuleHandle("c:\windows\system32\notepad.exe")