PDA

View Full Version : Solved: Multiple instances of VBAProject



Remalay
01-12-2007, 02:43 AM
Guys,

Using xl to xl (XP2003) a problem has arisen that I cannot determine why or how to eliminate......:banghead:

One wkbk contains the bulk of the VBA coding (Mstr), whilst the second contains the reference data (Db). During normal operation of Mstr it will invoke many ADO copyfromrecordset's from Db, as well as opening Db to make changes and additions to the reference data.

The problem is that when opening Db to make changes/additions and subsequently closing the Db wkbk, an instance of the VBAProject still remains within the Project Explorer window. Then each further Db change/addition adds yet another instance, resulting in a listing of several instances of the same VBAProject!

Only by closing the application do I seem to be able to remove these and restore normality.


Where am I going wrong. What am I doing that I shouldn't be/not doing that I should be? Any suggestions : pray2: GREATLY appreciated.

Remalay

Remalay
01-12-2007, 05:19 AM
Whoops! :hide: Problem isolated.

A rouge ADO copyfromrecordset had found its way in between an 'openfile' and 'file close' instructions.