Custom Excel 2007 Tab disappears when editing an XLAM add-in file

J

JeffreyW

I have a custom Excel 2007 Tab, deployed in an XLAM add-in file that works as
it is supposed to in other regards, but disappears when editing the XLAM file
itself (i.e., the ThisWorkbook IsAddin property is changed to False) AND then
Switching Windows to another Excel file. If I switch back to the XLAM file,
the custom Tab re-appears but then disappears again when I switch back to
another file besides the XLAM. When the XLAM ThisWorkbook IsAddin property
is changed back to True, the custom Tab is then again visible even with the
same file that it was previously not visible with when editing the XLAM
file.

I'm hoping someone might either have some insights into to either how to
prevent this from happening or perhaps suggest a macro to correct it if it
can't be prevented.

Thanks!

Jeff
 
R

Ron de Bruin

Hi JeffreyW

If IsAddin = false Excel see it as a normal workbook so it will read
the RibbonX when you activate the workbook and remove the custom tab
when you deactivate the workbook

So it is normal what you see
 
J

JeffreyW

Hi Ron and thanks for posting on this. Your answer makes sense and I can see
how MS might even want that to happen although I would prefer to not have my
UI affected just because the file I have active changes. Do you expect this
is something I will have to live with or might there be a way around this?

Jeff
 
J

JeffreyW

Well, I have assembled a set of tools on this custom tab that may be useful
in working with either the Add-in itself or with other open Excel files that
my attention may be diverted to from time to time and I'd like for all of
these tools to stay where I put them without MS deciding that I don't need
them anymore.

Jeff
 
J

JeffreyW

Well, it would seem like a bit of overkill to do that but if that's my only
choice, I can either live with it or work around it. Your questions did make
me re-think this, though ... I was mostly concerned that users of this add-in
would experience this behavior should they edit ANY Add-In but I don't think
that's the case - it's only if they were editing THIS Add-in that this would
happen (and if that's the case, then I'm not really concerned because users
shouldn't be editing this Add-In anyway). IF I've got this wrong, let me
know, but otherwise, I think this issue is resolved for me.

Thanks, Ron.

Jeff
 
R

Ron de Bruin

Hi JeffreyW

Normal users not change add-ins and if you want this you can use
a userform to get information from the user and save this on a sheet in the add-in.

You not have a problem of losing your ribbon tab



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


JeffreyW said:
Well, it would seem like a bit of overkill to do that but if that's my only
choice, I can either live with it or work around it. Your questions did make
me re-think this, though ... I was mostly concerned that users of this add-in
would experience this behavior should they edit ANY Add-In but I don't think
that's the case - it's only if they were editing THIS Add-in that this would
happen (and if that's the case, then I'm not really concerned because users
shouldn't be editing this Add-In anyway). IF I've got this wrong, let me
know, but otherwise, I think this issue is resolved for me.

Thanks, Ron.

Jeff
 
S

Smartbiz

For editing, you can get create a toolbar that shows on the addins tab..

That stays there and the file can be a .xlsm or .xlam

If you are constantly editing the code, then use the toolbar method and
make it a .xlsm file....

We use the above method for testing as it is easier to test a .xlsm file
than a .xlam file and we have some code that showsthe toolbar if it is a
.xlsm file otehrwise it assumes the file is an addon and the custom
ribbon would be used.

Tom Bizannes
http://www.macroview.com.au
Sydney, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top