I can't recreate but I'm intrigued as to why Excel would read fromVirtualStorerather than the OPENx path, notwithstanding what you've already
reported about that.
It might help if you scan through the thread on VirtualStore I linked
to in one of my posts in this thread.
Excel does not know that it's reading the file from VirtualStore.
Excel does not know anything about VirtualStore. Excel thinks it's
reading the file from the OPENx path. Windows 7 silently redirects it
to the VirtualStore path, without Excel knowing about the redirect
(referring to Excel 2002 and earlier, with an add-in installed under
Program Files).
To clarify,
- the addin is uninstalled, is that myAddin.Installed=false or with Excel
closed via the registry
No, I mean uninstalled from Windows; same as going to the Programs
control panel and uninstalling it. The installer code does not
automate each installed version of Excel to uninstall the add-in
through Excel's object model.
- the old file is moved from the OPENx path toVirtualStore,
No, nothing happens to VirtualStore during setup or uninstall.
The file is moved to VirtualStore when Excel opens it, and no file of
the same name and path already exists in VirtualStore.
- the new file with same name is then copied to the original OPENx path
Yes.
- An identical OPENx is recreated, though maybe the 'x' is a tad different
The installer code makes sure there is one and only one OPENx line
pointing to the add-in being installed.
- Excel opens the old file that's been moved toVirtualStore,
Excel opens the file at the OPENx line, but Windows 7 silently
redirects it to VirtualStore. If there was already a file by that name
and path in VirtualStore, that's the one that Windows gives Excel. If
there was not already a file by that name and path there, then Windows
7 copies the file in the OPENx path to VirtualStore, and gives that
one to Excel.
remind me
again what's the addins("myAddin").fullname and when open
Thisworkbook.Fullname
addins("myAddin").fullname and Thisworkbook.Fullname both point to the
OPENx path.
Nothing in Excel points to the VirtualStore path. One way you can tell
that is has been redirected to the VirtualStore path is that if you
edit the add-in and save the change, the file in the OPENx path is not
updated, but the file in the VirtualStore path is updated. Again this
is in reference to Excel 2002 and earlier, and add-ins installed under
Program Files.
Greg