From: sven2000 on
I'm trying to lock out a part of the code depending on a status flag.
However VB insists that it still needs the procedure that I've ocked
out. Is there a way to make this work?

StandAlone = True

If StandAlone Then
Call LineXX(0, 0, 100, 100)
Else
Call LineAA(0, 0, 100, 100)
End If
From: Nobody on
"sven2000" <sven2000(a)gmail.com> wrote in message
news:eee0802d-8804-403b-9148-7f703d8b8b81(a)g10g2000yqh.googlegroups.com...
> I'm trying to lock out a part of the code depending on a status flag.
> However VB insists that it still needs the procedure that I've ocked
> out. Is there a way to make this work?
>
> StandAlone = True
>
> If StandAlone Then
> Call LineXX(0, 0, 100, 100)
> Else
> Call LineAA(0, 0, 100, 100)
> End If

Use conditional compilation using #Const and #If, also around the routine
too. See MSDN for details.


From: Jeff Johnson on
"Nobody" <nobody(a)nobody.com> wrote in message
news:el9764PzKHA.5332(a)TK2MSFTNGP02.phx.gbl...

>> I'm trying to lock out a part of the code depending on a status flag.
>> However VB insists that it still needs the procedure that I've ocked
>> out. Is there a way to make this work?
>>
>> StandAlone = True
>>
>> If StandAlone Then
>> Call LineXX(0, 0, 100, 100)
>> Else
>> Call LineAA(0, 0, 100, 100)
>> End If
>
> Use conditional compilation using #Const and #If, also around the routine
> too. See MSDN for details.

But note that this only works at COMPILE time and cannot simply be performed
at run time.


From: Larry Serflaten on

"sven2000" <sven2000(a)gmail.com> wrote

> I'm trying to lock out a part of the code depending on a status flag.


What does "lock out" actually mean, and, how much locked out code
are you talking about?

If its one set of routines, vs another similarly named set, you might
be able to use COM. One class has one set, a different class has
another, and you instantiate the class you need when the flag is set.

LFS


From: sven2000 on
On Mar 26, 5:05 pm, "Nobody" <nob...(a)nobody.com> wrote:
> Use conditional compilation using #Const and #If, also around the routine
> too. See MSDN for details.

Thanks :)

On Mar 26, 5:18 pm, "Jeff Johnson" <i....(a)enough.spam> wrote:
> But note that this only works at COMPILE time and cannot simply be performed
> at run time.

I noticed, but this is not a real issue