Solved

Math with textbox text

Posted on 2003-11-10
2
317 Views
Last Modified: 2010-05-03
Hi, I want to know how to do this: I write for example, "1+1" in a textbox, and when I press a button, the text turns into 2. And just like that, if I write "3+3" it says 6, if I write "6*2" it says 12... is there any way of doing that? Thanks!
0
Comment
Question by:HyMaX
2 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 30 total points
ID: 9718547
easiest way is to use ms script control (under project/references) then do:

Dim scr As New MSScriptControl.ScriptControl
scr.Language = "VBScript"
MsgBox scr.Eval(Text1.Text)
0
 

Author Comment

by:HyMaX
ID: 9718581
Perfect, thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now