Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Executing a String Variable

I would like to Know how to Execute a String Variable. In Clipper you could populate a String Variable with code and then later include in your source code with an @ or an &.

example :

cString as String
cString = "If bolFlag = true then bolFlag = False"
'Later then you can use the Variable to test something

Public Sub Test()
...
@cString
...
End Sub

Is this Posible in VB and if so , How ???
Urgent Responses Please.

EMAIL : [email protected]

Comments

  • ZantosZantos Member Posts: 139
    Sorry dude, I don't think you can do that, although I may be wrong :/ I know you can make single words like that though, just not whole lines of code...I think

    ex.
    m = MsgBox
    m ("Hey!")

    that would work, don't know if it helps any though...


    ..:: Zantos ::..
  • dragonstormdragonstorm Member Posts: 44
    : I would like to Know how to Execute a String Variable. In Clipper you could populate a String Variable with code and then later include in your source code with an @ or an &.
    :
    : example :
    :
    : cString as String
    : cString = "If bolFlag = true then bolFlag = False"
    : 'Later then you can use the Variable to test something
    :
    : Public Sub Test()
    : ...
    : @cString
    : ...
    : End Sub
    :
    : Is this Posible in VB and if so , How ???
    : Urgent Responses Please.
    :
    : EMAIL : [email protected]
    :

    This might work but I haven't tested it yet. Press Ctrl-T while in VB6
    & select "Microsoft Script Control" (somethin like that) & insert 1 of
    the scripts in a form. It should run functions somehow but you'll have
    2 experiment wt it.

    [b][red]Dragon[/red][purple]storM[/purple][/b]
  • StaticIncStaticInc Member Posts: 4
    : : I would like to Know how to Execute a String Variable. In Clipper you could populate a String Variable with code and then later include in your source code with an @ or an &.
    : :
    : : example :
    : :
    : : cString as String
    : : cString = "If bolFlag = true then bolFlag = False"
    : : 'Later then you can use the Variable to test something
    : :
    : : Public Sub Test()
    : : ...
    : : @cString
    : : ...
    : : End Sub
    : :
    : : Is this Posible in VB and if so , How ???
    : : Urgent Responses Please.
    : :
    : : EMAIL : [email protected]
    : :
    :
    : This might work but I haven't tested it yet. Press Ctrl-T while in VB6
    : & select "Microsoft Script Control" (somethin like that) & insert 1 of
    : the scripts in a form. It should run functions somehow but you'll have
    : 2 experiment wt it.
    :
    : [b][red]Dragon[/red][purple]storM[/purple][/b]
    :


    Thanx it sure works.
    And very good too
    Thanx
  • Justin BibJustin Bib USAMember Posts: 0

    _______ \ http://forcoder.org \ free ebooks and video tutorials about || PHP, Scratch, Perl, Visual Basic .NET, C, Objective-C, Assembly, Delphi, Swift, C++, JavaScript, Visual Basic, C#, R, Go, Java, Python, PL/SQL, Ruby, MATLAB ABAP, COBOL, Lua, Bash, ML, D, Fortran, Ada, Erlang, Scala, Rust, Hack, Awk, Alice, Apex, Logo, Dart, Lisp, Prolog, Kotlin, Scheme, SAS, Clojure, VBScript, FoxPro, F#, LabVIEW, Crystal, Transact-SQL, Julia || _

Sign In or Register to comment.