Multiple VBAProjects in Excel File

G

Guest

Can I create multiple VBAProjects in an Excel Workbook?
If so, how?

I want to distribute an Excel Workbook with a lot of VBA
code. Most of the VBA code will be in a locked
VBAProject so the user can use it but cannot see it.

I want to provide sample VBA code in an unprotected
project which the user can customize. For example,
customize the contents and format of a report.

Can I create multiple VBAProjects in an Excel Workbook
and specify whether each project is locked or open?

I've been able to do this ad hoc by creating a sample.xla
addin. The user then has to explicitly save the
sample.xla project whenever he makes changes, this
creates another disk file which the user needs to worry
about. I'd much rather have the multiple VBAProjects
stored in a single excel file and saved in a single
operation if possible.

Please submit alternative solutions if you have a better
method for providing locked and open code to users. A
high usage requirement is simplicity.

thanks.
 
K

Keith Willshaw

Can I create multiple VBAProjects in an Excel Workbook?

Not as far as I know but if you are using Office 2000 or higher
you coulddevelop your code in a com add-in
If so, how?

I want to distribute an Excel Workbook with a lot of VBA
code. Most of the VBA code will be in a locked
VBAProject so the user can use it but cannot see it.

I want to provide sample VBA code in an unprotected
project which the user can customize. For example,
customize the contents and format of a report.

Can I create multiple VBAProjects in an Excel Workbook
and specify whether each project is locked or open?

No and plase note that the VBA lock isnt very secure
I've been able to do this ad hoc by creating a sample.xla
addin. The user then has to explicitly save the
sample.xla project whenever he makes changes, this
creates another disk file which the user needs to worry
about. I'd much rather have the multiple VBAProjects
stored in a single excel file and saved in a single
operation if possible.

Please submit alternative solutions if you have a better
method for providing locked and open code to users. A
high usage requirement is simplicity.

Export the sample code module as a .bas fileand let the user
import it it into his own workbook. You really
dont want users messing with your add-in, if nothing
else suppport becomes impossible.


Keith
 
G

Guest

Thanks for the suggestions. So far the best approach
I've found is to create a "sample.xla" addin file and
include this with the distribution kit. The sample
VBAProject will be unprotected so the user can modify it.
The user must explicitly save the sample.xla file if he
makes any changes in the VBA editor.
 

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