Hi Keith
Don't import/export code and modules, it's messy and vulnerable. Put your
code in an addin instead:
http://erlandsendata.no/english/inde...aaddinsgeneral
addins doesn't have windows and can't easily be closed during the session.
HTH. Best wishes Harald
"KR" skrev i melding
...
I am challenged with a project where about 250 users will all have their
own
workbooks in a shared area, but I need to minimize the effort associated
with code updates and some worksheets with reference data.
One option that has come up is to keep the code modules separate (as .bas
files and whatever userforms export as) in the same
network drive, then each time a user opens their file, import the
appropriate modules- so the only code in each workbook would be in the
onopen event (load all bas files) and the close event (remove all bas
modules). That way, if I ever need to make changes, I only have to change
one set of .bas files to affect all the workbooks.
However, I've had trouble when I try to remove .bas files using a second
workbook (on a separate project)...even when I put in time delays, save
and
close the file, etc., it hasn't been reliable. It often simply doesn't
remove the old .bas file(s).
Anyone have any thoughts on this .bas import/delete method, as opposed to
keeping all the code in a separate workbook? With the separate workbook
option, I'd need to hide the code workbook so the user didn't switch
windows
and close it. I'd also need to search for it and close it when they close
their individual workbook... It sounds like there would be all sorts of
potential for problems in that approach too....
Thanks for any advice,
Keith
--
The enclosed questions or comments are entirely mine and don't represent
the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.