im writing a app that u write some vbscript or javascript or html
and u can run it
does anyone know how to run any of these languages from in vb
im writing a app that u write some vbscript or javascript or html
and u can run it
does anyone know how to run any of these languages from in vb
Hi,
Add a "MSScriptControl" to ur project.
Rename it as MyScript. Add a TextBox and a Command button on the form
and use this code to run it:
Private Sub Form_Load()
MyScript.Language = "VBScript"
MyScript.AddObject "Form1", Form1
MyScript.AllowUI = True
Text1 = "a = Ucase(InputBox(""Enter Ur Name""))" & vbCrLf & _
"MsgBox ""Thanks For using MS ScriptControl "" & a" _
& "'Change the form" & vbCrLf & _
"Form1.BackColor = vbBlue"
End Sub
Private Sub Command1_Click()
On Error GoTo Lerr
MyScript.AddCode Text1
Exit Sub
Lerr:
MsgBox Err.Number & Err.Description, vbCritical, "error"
Err.Clear
End Sub
Regards
Veena
how do u add mscontrol
Hi,
Goto menu :
Projects>> Components>>
Search "Microsoft Script Control 1.0"
Check this and Click OK.
Now u have it in ur ToolBox at the end..
From there add to the form and use the Above Code. u can change the Scrpt code later..
Regards
Veena
it dont show up in tool box
Hi,
follow the above procedure. did u Check it and Clicked "OK"..?
it will add in toolbox, but it will be in the end, if u have many controls on the toolbox, Increase the width of toolbox and check..
it is a small icon resembling VBProject icon..
Regards
Veena
nope dont work im using vb 2005
how do u rename it
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.