PDA

View Full Version : API call working in Excel 2007 but not 2010!



David Thorn
11-13-2011, 07:30 AM
Hi Chaps

Got an excel spreadsheet that calls the api and lists the path of open files it worked well until I upgraded to 2010, now I get an automation error - does anyone know of any API changes in 2010?

In my example its the code

Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long


that seems to be causing the problem, not sure what this can be changed to in Excel 2010.

Paul_Hossler
11-13-2011, 09:57 AM
Lot of changes between 32 bit and 64 bit Office

I have 32 bit 2010 and your WB loads and complies without errors

http://msdn.microsoft.com/en-us/library/ee691831.aspx

http://www.jkp-ads.com/articles/apideclarations.asp


Not sure what the expected results are, but when I run psLoadForm I get



clsid:331F1768-05A9-4DDD-B86E-DAE34DDC998A:
!{00024500-0000-0000-C000-000000000046}
!{00024505-0014-0000-C000-000000000046}
!{FB50E079-F904-4833-B7C0-309366351F3A}
clsid:FFDE5359-5502-4F1A-8395-EFCAEEE02D3D:


on Sheet1


Paul