Multiple VBAProjects in Excel File
wrote in message
...
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
|