Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Let user run script in VB Apllication


Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2004, 08:52 AM
BombDrop BombDrop is offline
Newcomer
 
Join Date: Sep 2004
Location: St.Helens, England, UK
Posts: 20
Unhappy Let user run script in VB Apllication [Resolved]


I wish to allow a user to execute a small VBScript that they write within my app. I though i could get what i want vai the Windows Scripting Host but am unable to achive my aims. can any one help.

Thanks
__________________
BombDrop's VB.Classic Help File

Last edited by BombDrop; 11-09-2004 at 09:24 AM. Reason: Question Resolved
Reply With Quote
  #2  
Old 11-09-2004, 09:08 AM
00100b's Avatar
00100b 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

See the Microsoft Script Control component.

Example usage:
Code:
Private Sub Command1_Click() Dim strcode strcode = "Sub VBSMain() " & vbNewLine & "MsgBox " & Chr(34) & "Foo" & Chr(34) & vbNewLine & "End Sub" With Me.ScriptControl1 .AddCode strcode .Run "VBSMain" End With End Sub
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #3  
Old 11-09-2004, 09:23 AM
BombDrop BombDrop is offline
Newcomer
 
Join Date: Sep 2004
Location: St.Helens, England, UK
Posts: 20
Default

Thanks alot mate that is great, just what i wanted!!
__________________
BombDrop's VB.Classic Help File
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->