View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Passing Objects from Excel VBA collection to a VB6 DLL

I'm having difficulty visualising what's in the dll (parameter dec's etc) &
whets in VBA (it's late where I am!).

First suggestion is turn off (comment) your error handling in VBA and F8
through, if you actually get into the VB6 routine look at locals.

If nothing obvious create a new highly simplified illustrative example and
post the full VBA/VB6.

Regards,
Peter T

(signing off)

"Dan" wrote in message
ups.com...
Hi Peter,
I stepped through the code as you requested. The error message is
coming from Microsoft Excel. When I put the VB6 dll into debug and
call it from the Excel Addin the program execution jumps from Excel to
the VB6 Editor and steps through the first procedure (startup) and then
jumps back to the Excel VBA editor. Then when execution goes to the
second procedure (getCustomerName), the program execution jumps
immediately to my error handle routine in VBA, it never tries to
execute the procedure in the DLL.


'This line will Jump to the DLL and execute during debug.
plugins(CInt(tmp(0))).startup CInt(tmp(1)) 'this line works fine,
passing an integer

'This line doesn't execute the DLL procedure but rather jumps
immediately to the error handling routine in Excel.
plugins(CInt(tmp(0))).getCustomerName (Customer) 'this line
fails, passing in custom object


Thanks
Dan