Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax help please...
Message
 
À
12/02/1999 15:12:51
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00187156
Message ID:
00187369
Vues:
16
>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,

On your form, do you have a textbox control with its name property set to txtScript? If you don't, it will never work.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform