MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Display sheet 1 of an addin - how to.

  Asked By: Bill    Date: Sep 20    Category: MS Office    Views: 1560

What need I do to display as the active sheet, sheet1 of an addin from
a macro within the addin?



3 Answers Found

Answer #1    Answered By: Jamie Williams     Answered On: Sep 20

Create a macro  inside the add-in with this single line of code.

ThisWorkbook.IsAddin = False

I would also suggest creating one that reverse this . . .

ThisWorkbook.IsAddin = true

Assign each to a separate toolbar button and you should be set.

Answer #2    Answered By: Darrell Harvey     Answered On: Sep 20

I do have a
followup. Excel thinks it has to save the add-in after I do some
work and on exit asks to save the file. If it gets saved by the user
and the property is set to false, the addin  will be corrupt. Is there
a way to prevent the message?

Answer #3    Answered By: Bethany Hughes     Answered On: Sep 20

I did resolve this by setting a workbook property "saved" to true.
Thanks for the help.

Didn't find what you were looking for? Find more on Display sheet 1 of an addin - how to. Or get search suggestion and latest updates.