Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax help please...
Message
From
12/02/1999 15:12:51
 
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Syntax help please...
Miscellaneous
Thread ID:
00187156
Message ID:
00187156
Views:
53
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
Next
Reply
Map
View

Click here to load this message in the networking platform