View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JAC JAC is offline
external usenet poster
 
Posts: 31
Default Help/Advice Required

I have managed to devolve a substantial portion of VBA code from an
Excel workbook that behaves as an application into a DLL.

However, I have encountered a problem when I have other unrelated
workbooks open. Normally, when another workbook is opened when Excel
is running, the most recently opened workbook joins those already open
in the Workbooks collection.

For my special workbooks, I have an instance of Excel running in the
DLL, created using CreateObject. The calling workbook, which uses the
DLL, communicates with the instance of Excel successfully. However,
the object in the DLL has no knowledge whatsoever of any workbooks
opened outside itself.

Does anyone know how I could do this? Many thanks