By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

Execute mathematical function entered in a string

P: 1
hey, im kinda new to VB, and i was wondering how to get a string operation to be read as a mathematics function. if anyone could help me that would be great. if you could email that would be even better.

<snip>
Sep 7 '07 #1
Share this Question
Share on Google+
3 Replies


epots9
Expert 100+
P: 1,351
Removed email from post in regards to site rules
Sep 7 '07 #2

epots9
Expert 100+
P: 1,351
Moved to the VB forums so that the local experts can better assist you.
Sep 7 '07 #3

kadghar
Expert 100+
P: 1,295
hey, im kinda new to VB, and i was wondering how to get a string operation to be read as a mathematics function. if anyone could help me that would be great. if you could email that would be even better.

<snip>
hey, im kinda new to VB, and i was wondering how to get a string operation to be read as a mathematics function. if anyone could help me that would be great. if you could email that would be even better.

<snip>
'Im not sure if there is an easy way, but, you can always create your own text reader. use ascii to search numeric values use the mid function, give it a try.

Or you can go to here to see how to run vb code from a string.
Define a variable, let's say A as Double
now, let's say you write down 2+2 in you textbox.

The string to be run should contain "A = " & textbox1.text
and after that you can return A.
Sep 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.