PDA

View Full Version : Sleeper: Com addin



gibbo1715
08-22-2005, 11:42 AM
im just starting to learn how to make these using office 2000 developer, can anyone tell me is it possible to save a whole excel project as an addin (i.e the worksheets as well) or just the vba code?

Jacob Hilderbrand
08-22-2005, 07:32 PM
When you save the workbook as an add-in, all the sheets will remain. But the sheets will be hidden and the user cannot use them. VBA code can use these sheets to store data.

gibbo1715
08-23-2005, 12:57 AM
sorry jake can you explain a little more for me or tell me where to look for more info,

basically im wondering if i can make a template database saved as a com addin where the userforms will store data onto the worksheets named customer, products etc or do i have to make the com add in name the spreadsheets progamatically and add new ones etc. i would also like to add code to the workbook_open event when the addin is run, is that possible from a com addin?

Thanks for taking an interest Jake

Gibbo

royUK
08-23-2005, 04:39 AM
You can write data to an addin, but how would you allow the user to access it? you can add code programatically (see Chip pearson), but the VB Project must not be protected.

gibbo1715
08-23-2005, 06:04 AM
what im planning on making is an addin that is in effect a template, if thats possible.

so when called it creates a new spreadsheet containing code and the worksheets i have already designed and saves it with a name i specify.

If the addin is run again does exactly the same again i. e a new spreadsheet.

I can write the code I require using the standard vba with no problem but wanted to know if i have to programatically name and create the worksheets or if i can just retain the ones I have already as a template when creating a com addin.

I also want to be able to write code to the workbook_open event if thats possible.

Hope that makes sense

Gibbo

Bob Phillips
08-23-2005, 07:02 AM
Why not just create a template?

gibbo1715
08-23-2005, 07:13 AM
i want to be able to protect the code as much as possible and understand a com addin to be much more secure

Aaron Blood
08-24-2005, 08:55 PM
i want to be able to protect the code as much as possible and understand a com addin to be much more secure

Well you're right about that... A compiled addin would indeed be more secure.

But typically those kinda things are developed in like VB6 (or is it 7 or 8 now?) or visual C+ or something along those lines.

...and they're usually just userform based apps that are designed to run on top of Excel. Actually compiling the sheets of a workbook? Haven't investigated that too deeply myself. Seems unlikely. Heard some rumors of some sorta developer version of Office or somethin or other (probably what you've got there) but haven't looked much further into it. Don't know what all it can compile.