Hide a Spreadsheet in an Add-in

P

PaulW

I'm looking at have a userform saved in an Excel Application. The reason for
it being a userform is to give greater control over the options. Once a user
has selected the information and how they want to present it I want the
option to print it out.

Tried printing the userform and the quality is rather poor, and it doesn't
look particularly good (and isn't in Landscape) so I want to have the
information put into an excel spreadsheet and print the sheet. I'd rather
avoid linking to a specific workbook saved on the server to use as a
template, and noticed when saving the userform as an add-in that the
worksheet objects are still present in ths add-in.

Is there anyway of saving the worksheets in an addin, and being able to
reveal them and populate them?
 
J

Jim Thomlinson

To expose an addin toggle the IsAddin property which is found in the
properties for thisworkbook. My suggestion would be to create the template
sheet in your addin and then copy that sheet to a new workbook when you want
to expose it.
 
P

Peter T

I don't really follow what you want to do. Print the form but the quality is
not good? So you want to put info on a sheet, fair enough but why not simply
add a new workbook and put your info on that.

Workbooks.Add

You can of course keep info on a sheet in your addin which of course will
remain hidden. You could update info on the sheet and save when required.
You could print it in the normal way or if you want to make it viewable
simply do this -

Thisworkbook.Worksheets(1).Copy

Regards,
Peter T
 
P

PaulW

I don't want to add a workbook and then have 500 lines of code to get the
text and formatting right before adding in the figures.
Thisworkbook.Worksheets(1).Copy

Works perfectly thanks. Now I can set it all out and just run that then put
the data in so the user can print/save whatever they want.#

Cheers!
 

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