Roedd <<Bob Phillips wedi ysgrifennu:
The AddressOf came in in Excel 2000 (although it can be emulated with
Excel97, Version 8).
Application.hwnd property, came in in Excel XP/2002 (version 10)
In earlier versions of Excel, the hwnd workaround was:
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal _
lpClassName As String, ByVal _
lpWindowName As String) As Long
Function GetAppHWnd() As Long
Application.Caption = "__@" & CStr(Rnd())
GetAppHWnd = FindWindow("XLMAIN", Application.Caption)
Application.Caption = Empty
End Function
For the Addressof workaround in Office97 see he
http://mc-computing.com/Databases/MS.../AddressOf.txt
Rob