Results 1 to 7 of 7

Thread: HELP FAST IF POSSIBLE!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32
    Is there a function in VB that will evaluate an expression and return a result?

    Example (1=1) = True

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try using Eval, which is in the Scripting Host (look under Project->References).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    In a short while

    with VB7.0 will come

    C/C++ Style Boolean Short-circuiting on “if then” statements

    If Not (x Is Nothing) And (x.Prop = 5) Then
    The above will now work. In VB6 you had to write :
    If Not (x Is Nothing) Then
    If (x.Prop = 5) Then

    soon

    Hang in there, Angela!

  4. #4
    nickthompson
    Guest

    Eval function

    Parksie,

    Trying to use Eval function. I can't find the Scripting Host under Project References. Is that the exact name of the reference? If so, I haven't got it - any tips on how I can get it?

    Cheers

    Nick

  5. #5
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Under components: Microsoft Script Control
    I think this gets installed with a certain version of interner explorer.

  6. #6
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    I don't see the problem?

    Code:
    Private Sub Command1_Click()
    Dim b As Boolean
    b = (1 = 1)
    MsgBox b
    End Sub

  7. #7
    nickthompson
    Guest

    Still can't find it...

    I don't seem to have the Microsoft Script Control installed, but I have installed IE3, 4 and 5!

    Do you have the filename for the DLL? maybe it's buried somewhere on my system.

    Thanks

    Nick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width