Solved

Math with textbox text

Posted on 2003-11-10
2
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

717 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