and u can run it
does anyone know how to run any of these languages from in vb
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
how do u add mscontrol
Goto menu :
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..
it dont show up in tool box
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..
nope dont work im using vb 2005
how do u rename it