Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API call working in Excel 2007 but not 2010!

Status
Not open for further replies.

mrdavidthorn

Programmer
Nov 13, 2011
1
GB
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.
 
If that's all you want, why can't you go 'ForEach'ing through the Workbooks collection in Excel and getting workbook.Path?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top