G
Greg Lovern
I thought I'd share a weird experience I had today in case it saves
anyone else some time.
I updated an add-in, updated the installer for it -- which registers
it as an add-in for all installed versions of Excel -- and tested it.
Fine in Windows 2000 in all installed versions of Excel. Boot to
Windows XP, fine there too.
Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002
and 2000 were still loading the old version of the add-in.
I uninstalled the add-in, made sure it was gone, and reinstalled it.
Same problem in Excel 2002 and earlier; still works fine in Excel 2003
and later.
I opened the VB editor in Excel 2003 and in Excel 2002, and looked at
the code. I can see the differences in the code for the two versions
of the add-in. Also, I had changed the add-in's VBA password, and I
have to use the old password in Excel 2002 and the new password in
Excel 2003.
I assumed that 2002 must be getting the file from some other location.
so I used thisworkbook.path in the Immediate pane, expecting some
other path for 2002. But it's the same path. Wondering if there was a
space in one of the paths, I also check len(thisworkbook.path), but
it's the same in both versions. So I checked thisworkbook.name and
len(thisworkbook.name), and both of those are the same. I alt-tabbed
quickly back and forth between Excel 2002 and 2003 many times, and I
can see the different code and different toolbar look flashing back
and forth, but the text in the Immediate pane is exactly the same --
VBA reports exactly the same filename, filename length, path, and path
length for both versions of the add-in.
So I saved a new change to the add-in in 2002, and made a note of the
system time. Then I closed both and did a search on the drive for the
add-in filename, and sorted by date. I found two with that date/time
stamp:
C:\Users\<mylogin>\AppData\Roaming\Microsoft\Office\Recent\
C:\Users\<mylogin>\AppData\Local\VirtualStore\Program Files\<my add-in
folder>\
I doubted that the Recent one was the problem, but I wanted to rule it
out, so I deleted it and restarted Excel 2002. Same problem.
Then I tried to delete the one under VirtualStore. It said it couldn't
delete it because it was open in Excel. I had left Excel 2002 open
after testing the one in Recent.
So I closed Excel 2002, deleted the one under VirtualStore, and
restarted Excel 2002. Problem fixed; it was now seeing the new version
of the add-in.
BTW, this was all on 32-bit Windows 7. I haven't tested this on 64-bit
Windows 7 yet.
Obviously this could be a problem for my customers upgrading to a
newer version of my add-in while using an older version of Excel (I do
have a tiny percentage of such customers; some are still on Excel 97).
Fortunately, most of those customers are also still on older versions
of Windows (one asked about running the add-in on Windows 2000 just
days ago), so it wouldn't be an issue for them.
But if any of my customers run into this issue, because they're on
Windows Vista (turns out it does the same thing; I just hadn't used it
enough to see this issue) or later but on Excel 2002 or earlier, and
want to upgrade to a newer version of my add-in, I'm not sure what I
should do for them other then give them instructions to manually
delete the one under VirtualStore. I'm not sure that it would be a
good idea for my add-in's installer to try to delete it there.
Any thoughts?
Greg
anyone else some time.
I updated an add-in, updated the installer for it -- which registers
it as an add-in for all installed versions of Excel -- and tested it.
Fine in Windows 2000 in all installed versions of Excel. Boot to
Windows XP, fine there too.
Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002
and 2000 were still loading the old version of the add-in.
I uninstalled the add-in, made sure it was gone, and reinstalled it.
Same problem in Excel 2002 and earlier; still works fine in Excel 2003
and later.
I opened the VB editor in Excel 2003 and in Excel 2002, and looked at
the code. I can see the differences in the code for the two versions
of the add-in. Also, I had changed the add-in's VBA password, and I
have to use the old password in Excel 2002 and the new password in
Excel 2003.
I assumed that 2002 must be getting the file from some other location.
so I used thisworkbook.path in the Immediate pane, expecting some
other path for 2002. But it's the same path. Wondering if there was a
space in one of the paths, I also check len(thisworkbook.path), but
it's the same in both versions. So I checked thisworkbook.name and
len(thisworkbook.name), and both of those are the same. I alt-tabbed
quickly back and forth between Excel 2002 and 2003 many times, and I
can see the different code and different toolbar look flashing back
and forth, but the text in the Immediate pane is exactly the same --
VBA reports exactly the same filename, filename length, path, and path
length for both versions of the add-in.
So I saved a new change to the add-in in 2002, and made a note of the
system time. Then I closed both and did a search on the drive for the
add-in filename, and sorted by date. I found two with that date/time
stamp:
C:\Users\<mylogin>\AppData\Roaming\Microsoft\Office\Recent\
C:\Users\<mylogin>\AppData\Local\VirtualStore\Program Files\<my add-in
folder>\
I doubted that the Recent one was the problem, but I wanted to rule it
out, so I deleted it and restarted Excel 2002. Same problem.
Then I tried to delete the one under VirtualStore. It said it couldn't
delete it because it was open in Excel. I had left Excel 2002 open
after testing the one in Recent.
So I closed Excel 2002, deleted the one under VirtualStore, and
restarted Excel 2002. Problem fixed; it was now seeing the new version
of the add-in.
BTW, this was all on 32-bit Windows 7. I haven't tested this on 64-bit
Windows 7 yet.
Obviously this could be a problem for my customers upgrading to a
newer version of my add-in while using an older version of Excel (I do
have a tiny percentage of such customers; some are still on Excel 97).
Fortunately, most of those customers are also still on older versions
of Windows (one asked about running the add-in on Windows 2000 just
days ago), so it wouldn't be an issue for them.
But if any of my customers run into this issue, because they're on
Windows Vista (turns out it does the same thing; I just hadn't used it
enough to see this issue) or later but on Excel 2002 or earlier, and
want to upgrade to a newer version of my add-in, I'm not sure what I
should do for them other then give them instructions to manually
delete the one under VirtualStore. I'm not sure that it would be a
good idea for my add-in's installer to try to delete it there.
Any thoughts?
Greg