accessing sheets stored in add-in

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have an add-in that I built, with some worksheet templates in it. I
want my co-workers to be able to use the toolbar that I built for the
add-in to access the sheets that are in the add-in. Kind of like
unhiding them. How can I do this with a macro attached to the menu
item?
Jay
 
Are you sure an addin is the best way to go?

The addin is a hidden workbook. And to make it so that the user can see the
worksheet, you'll have to change the .isaddin property to false. Then you can
display the worksheet that you want.

Option Explicit
Sub testme01()
ThisWorkbook.IsAddin = False
'do some stuff
ThisWorkbook.IsAddin = True
End Sub


I have no idea what you're doing, but maybe if you're using those worksheets to
do some calculations, maybe you could create a userform that allows the user to
enter the values.

Then you could populate the cells on the worksheet in the addin, do your
calculations and display the results on the userform.

Or maybe you could just copy the worksheet to a brand new workbook with a line
like:

ThisWorkbook.Worksheets("sheet1").Copy
 
Yeah,
I basically want it to copy the worksheet template from the add-in to
the active workbook. I don't want them to have direct access to the
add-in sheets. I just don't want to distribute a workbook to everyone
for them to use, as we have limited space on our server, and not
everyone needs it all of the time.
 
Then you could use something like:

ThisWorkbook.Worksheets("sheet1").Copy _
before:=activeworkbook.worksheets(1)
 

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

Back
Top