Hi RBS:
Can you give an example of the imported sub where the variable is not
declared publicly, giving rise to a compile error? I'm not sure I completely
understand the problem. Is strSub a different sub at different times, with
different sets of variables?
Regards,
Vasant
"RB Smissaert" <bartsmissaert@blueyonder.co.uk> wrote in message
news:O7$GQJkTFHA.2768@tk2msftngp13.phx.gbl...
> Do I conclude then that there is just no solution for this?
>
> RBS
>
> "RB Smissaert" <bartsmissaert@blueyonder.co.uk> wrote in message
> news:OlThA0$SFHA.2872@TK2MSFTNGP14.phx.gbl...
> > Have the following situation:
> > An .xla file will import a Sub from a text file and then run it like
this:
> >
> > Dim strSub as String
> >
> > 'some code here to get the Sub imported
> > Application.Run strSub
> >
> > Now it is possible that in this imported Sub are variables that are not
> > defined publicly, so there
> > will be a compile error, variable not defined.
> > As this is not a runtime error I am not sure this error can be handled
> > gracefully, but I would be interested
> > in any suggestions how this could be done.
> >
> >
> > RBS
> >
>
Bookmarks