|
-
Nov 10th, 2000, 02:32 PM
#1
Thread Starter
Member
Is there a function in VB that will evaluate an expression and return a result?
Example (1=1) = True
-
Nov 10th, 2000, 02:36 PM
#2
Monday Morning Lunatic
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
-
Nov 10th, 2000, 04:08 PM
#3
Fanatic Member
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!
-
Apr 18th, 2001, 05:37 AM
#4
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
-
Apr 18th, 2001, 06:09 AM
#5
Under components: Microsoft Script Control
I think this gets installed with a certain version of interner explorer.
-
Apr 18th, 2001, 07:45 AM
#6
Fanatic Member
I don't see the problem?
Code:
Private Sub Command1_Click()
Dim b As Boolean
b = (1 = 1)
MsgBox b
End Sub
-
Apr 18th, 2001, 08:26 AM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|