From: sven2000 on 26 Mar 2010 11:53 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 26 Mar 2010 12:05 "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 26 Mar 2010 12:18 "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 26 Mar 2010 13:41 "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 26 Mar 2010 12:37 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
|
Next
|
Last
Pages: 1 2 Prev: Create ItemCheck event with Listview from Common Controls 5.0 Next: Improving Error Routine |