Thread: Import module
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Clif McIrvin[_3_] Clif McIrvin[_3_] is offline
external usenet poster
 
Posts: 203
Default Import module

"Charlotte E" wrote in message
...
Is there some reason the module can't be included in the project and
only use its code under certain conditions?


It contains XL2007 code, which won't complie under XL2003 - so, I
check for Application.Version, and import the module if Version is
11.

Works like a charm :-)
Unless if project is hidden from viewing :-(


Sounds to me like a place for conditional compiler code ... no time to
pull up an example just now; reply if you want more information. Open
up the VBE and enter conditional compile in the help box.

--
Clif


CE

"GS" wrote in message
...
Charlotte E wrote :
I need my VBA to import a module depending on certain conditions.

Problem is that the project is 'hidden from viewing' with a code,
and apparrently this also blocks for modules to be imported!

Is there a way to temporary unlock the project, import the module,
and then protect the project again?

I'm not talking about cracking the project - the code is known...

...just need to temporary allow for a module to be imported by VBA
code (the importing code, I already know :-)


Thanks in advance...


Is there some reason the module can't be included in the project and
only use its code under certain conditions?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc







--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)