Ïîëó÷åíèå àäðåñà âàøåé ôóíêöèè
 Access 2000/2002 ñ ýòèì ïðîáëåì íå âîçíèêàåò, íóæíî èñïîëüçîâàòü âñòðîåííûé ìîäèôèêàòîð AddressOf .
Ïðèìåð:
Call EnumFontFamiliesEx(hDC, lf, AddressOf EnumFontFamExProc, 0, 0)
 Access 97 âñå íåñêîëüêî ñëîæíåé, âñòðîåííûõ ñðåäñòâ ïîääåðæêè ôóíêöèé ñ îáðàòíûì âûçîâîì òàì íåò.
Íî âûõîä âñ¸ æå åñòü.
Äåêëàðèðóåì:
Private Declare Function GetCurrentVbaProject _
Lib "vba332.dll" Alias "EbGetExecutingProj" _
(hProject As Long) As Long
Private Declare Function GetFuncID _
Lib "vba332.dll" Alias "TipGetFunctionId" _
(ByVal hProject As Long, ByVal strFunctionName As String, _
ByRef strFunctionId As String) As Long
Private Declare Function GetAddr _
Lib "vba332.dll" Alias "TipGetLpfnOfFunctionId" _
(ByVal hProject As Long, ByVal strFunctionId As String, _
ByRef lpfn As Long) As Long
Àðãóìåíòû: strFuncName - ñòðîêà èìÿ âàøåé ôóíêöèè
Íàçíà÷åíèå: Ïîëó÷åíèå àäðåñà ïðîöåäóðû ïî å¸ èìåíè
Âîçâðàùàåò: Àäðåñ ôóíêöèè
Public Function AddrOf(strFuncName As String) As Long
Dim hProject As Long
Dim lngResult As Long
Dim strID As String
Dim lpfn As Long
Dim strFuncNameUnicode As String
Const NO_Error = 0
strFuncNameUnicode = StrConv(strFuncName, vbUnicode)
Call GetCurrentVbaProject(hProject)
If hProject <> 0 Then
lngResult = GetFuncID( _
hProject, strFuncNameUnicode, strID)
If lngResult = NO_Error Then
lngResult = GetAddr(hProject, strID, lpfn)
If lngResult = NO_Error Then
AddrOf = lpfn
End If
End If
End If
End Function
Ïðèìåð:
Call EnumFontFamiliesEx(hDC, lf, AddrOf("EnumFontFamExProc"), 0, 0)