Obtain a Process ID
Excel 2000 and below do not have the hwnd property so it is necessaryto find the Window handle by other means
You can't use "Microsoft Excel" with FindWindow (the caption is volatile). Instead use the Excel class, XLMAIN. This applies to ALL versions of Excel
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Lon
The class name is lpClassName, the caption is lpWindowName. Usually, just one or the other is specified.
|