View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pete[_18_] Pete[_18_] is offline
external usenet poster
 
Posts: 8
Default Lost reference to workbook

Hi all-

I have an application in which I use separate workbooks to store
persistent data. When I open (or create) these "data workbooks", I set
IsAddin = true, so the user is unable to see the data worksheets
directly.

I maintain a global variable DataWb as Workbook to access the single
active data workbook.

The problem is: When I am debugging, and the VBE is "reset", my global
variable DataWb loses its value (that is, it is re-initialized), but
the data workbook itself remains open. Since the data workbook has
IsAddin set, it does not appear in the Workbooks collection.

Does anyone know how to re-establish access to this data workbook
after a reset?

Thanks very much,
Pete