Hi everyone, I trying to figure out how to execute commands stored in string, let's say i have string called "command" and a textbox, so i want vb to run command that i typed in textbox, e.g. i type in textbox "label1.text = "bla bla"", and then type like "msgbox.show". Is that even possible? I hope you understand what i mean. Thanks.
KnifeDarky 0 Newbie Poster
Recommended Answers
Jump to PostDo you type in textBox both vlaues?
So your textbox after finishing writing looks like:textbox "label1.text = "bla bla"" "msgbox.show"
With or without quotation marks?
Jump to PostOn a button click or on textChnaged event?
Jump to PostOk, I have choosen a button click, but you can easiy use this code in TextChanged event too:
UPDATED:
Private Sub button1_Click(sender As Object, e As EventArgs) ExecuteMyCode(textBox1.Text) End Sub Private Sub ExecuteMyCode(text As String) Dim data As String() = text.Split(" "C) If data.Length > 1 …
All 12 Replies
Mitja Bonca 557 Nearly a Posting Maven
KnifeDarky 0 Newbie Poster
Mitja Bonca 557 Nearly a Posting Maven
KnifeDarky 0 Newbie Poster
Mitja Bonca 557 Nearly a Posting Maven
Mitja Bonca 557 Nearly a Posting Maven
KnifeDarky 0 Newbie Poster
Mitja Bonca 557 Nearly a Posting Maven
KnifeDarky 0 Newbie Poster
Netcode 33 Veteran Poster
adam_k commented: And how do you execute all VB.Net commands from variables? -1
adam_k 239 Master Poster
KnifeDarky 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.