I am using the following code directly from the MS Script Control Help file to create a demo script form. The compiler says that this code has a syntax error in the txtScript.Text definition. As I am NOT a VB effecianato, can anyone point me to the syntax error?
Private Sub Form_Load()
' Add MyObject to the Script Control. This adds
' the run-time functionality of the object to the
' control.
scDemo.AddObject "objScript", MyObject
' Add script to Textbox control.
txtScript.Text = _
"Sub SetRate()" & vbCrLf & _
" Dim Rate" & vbCrLf & _
" Rate = InputBox(""TaxRate:"",,.086)" & _
vbCrLf & _
" objScript.Rate = Rate" & vbCrLf & _
"End Sub" & vbCrLf & vbCrLf & _
"Sub TotalPrice()" & vbCrLf & _
" Dim price, ttl" & vbCrLf & _
" price = InputBox(""Price:"",,100)" & _
vbCrLf & _
" ttl =objScript.TaxIt(price)" & vbCrLf & _
" MsgBox ttl" & vbCrLf & _
"End Sub"
End Sub
TIA,
Kendall Webb
Senior Software Engineer
MCAD.Net/MCSD.Net