Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In Excel 97 there was no inbuilt way to refer to the address of a function. Kaplan and Getz put togeether a workaround for this ( http://www.trigeminal.com/lang/1033/...p?ItemID=19#19) which is very useful when required. Excel 2000 and above have the native AddressOf operator, which offers very similar functionality with one major difference. AddressOf returns a long, but only takes as a parameter a function name written in text - no quotes, just the name. It also will not accept a variable as a parameter. Kaplan and Getz offered their workaround for Excel 97 with this method signature Public Function AddrOf(strFuncName As String) As Long In this case we can see that we can have a variable function name and the code figures it the address and returns a long. So, the Kaplan & Getz code does not work in Excel 2002 and above (the platform I MUST use). A few hacks around show that the issue is that the library they reference - vba332.dll is not implemeted in the same way in vbe6.dll. So, with the constraints "MUST be in Excel 2002" and "must work with variable names for the callback address" I find myself stuck. I am working on a project where I cannor re-engineer to use text for the function names, they have to be variables and I cannot use another version of Excel. Can anyone help with this please? Thanks in advance. -- www.alignment-systems.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AddressOf Nightmare | Excel Programming | |||
AddressOf in Excel 2002 VBA? | Excel Programming | |||
usage "AddressOf TimerProc" in Excel97 | Excel Programming | |||
AddressOf / Windows API question | Excel Programming | |||
Excel 2002 files attached to Outlook 2002 EMails change size | Excel Programming |