Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a piece of code that will determine
the address of a routine/function that will work in both Office 97 and Office XP. I am needing this address for use in using some of the Windows API functionality. I have found a piece of code that helps me do this for VBE 5 (Office 97). The problem now is getting this functionality in VBE 6(Office XP). I have read on a few sites that VBE 6 has a built-in 'AddressOf' function. This would suit my needs perfectly, but the VB Editor does not recognize this function. Do I need a reference to a particular library or something? Thanks in advance for your responses. - Amos - |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Amos,
I presume that you mean Ken Getz;'s routine. Here is an example that I use Public Function fncWindowsTimer(TimeInterval As Long, WindowsTimer As Long) As Boolean WindowsTimer = 0 'if Excel2000 or above use the built-in AddressOf operator to 'get a pointer to the callback function If Val(Application.Version) 8 Then WindowsTimer = SetTimer(hWnd:=FindWindow("XLMAIN", Application.Caption), _ nIDEvent:=0, _ uElapse:=TimeInterval, _ lpTimerFunc:=AddrOf_Callback_Routine) Else 'use K.Getz & M.Kaplan function to get a pointer WindowsTimer = SetTimer(hWnd:=FindWindow("XLMAIN", Application.Caption), _ nIDEvent:=0, _ uElapse:=TimeInterval, _ lpTimerFunc:=AddrOf("cbkRoutine")) End If fncWindowsTimer = CBool(WindowsTimer) End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Amos" wrote in message ... I am trying to write a piece of code that will determine the address of a routine/function that will work in both Office 97 and Office XP. I am needing this address for use in using some of the Windows API functionality. I have found a piece of code that helps me do this for VBE 5 (Office 97). The problem now is getting this functionality in VBE 6(Office XP). I have read on a few sites that VBE 6 has a built-in 'AddressOf' function. This would suit my needs perfectly, but the VB Editor does not recognize this function. Do I need a reference to a particular library or something? Thanks in advance for your responses. - Amos - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cannot open exel from windows xp in windows vista and visa versa | New Users to Excel | |||
Macro switch between windows question | Excel Discussion (Misc queries) | |||
XP windows Registry Question | Excel Discussion (Misc queries) | |||
windows xp file name convertion question | Excel Discussion (Misc queries) | |||
SendKeys, Windows Active screen Question..Pls Help!!! | Excel Programming |