using vb script extensions in vb 
Author Message
 using vb script extensions in vb

I tried to reference VBScript.dll and in the object browser I can see a
globalobj class which has a method called split.

How do I access this in vb?

I tried
dim a = new vbScript_global.GlobalObj

But that didn't happen quite right. Error: ActiveX couldn't create object

There are quite a few handy features in Vbscript that would be helpful to
have in VB like the RegExp and Split (for VB5 users). I have a little
workaround using ScriptControl to access these methods but I was hoping
there would be a better way to do this.

Thanks in advance.

Chui



Fri, 14 Jun 2002 03:00:00 GMT  
 using vb script extensions in vb
Chui,

In order to use the RegExp object of VBScript I had to do this:

    Dim myRegExp As Object

    Set myRegExp = CreateObject("vbscript.regexp")
    myRegExp.Pattern = "xyz"
    MsgBox myRegExp.Pattern

Perhaps the same CreateObject technique will work for you,

Kerry Moorman

Quote:

>I tried to reference vbscript.dll and in the object browser I can see a
>globalobj class which has a method called split.

>How do I access this in vb?

>I tried
>dim a = new vbScript_global.GlobalObj

>But that didn't happen quite right. Error: ActiveX couldn't create object

>There are quite a few handy features in Vbscript that would be helpful to
>have in VB like the RegExp and Split (for VB5 users). I have a little
>workaround using ScriptControl to access these methods but I was hoping
>there would be a better way to do this.

>Thanks in advance.

>Chui



Sat, 15 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. IIS Extension using vb?

2. Using VBA/VB to Rename File Extensions

3. Calling one VB Script from another VB Script

4. Passing control from VB to VB Script -- need to access SetFocus in script

5. Using Stationery With VB Script In Outlook

6. Running RULE using VBA / VB Script.

7. Create tables using VB script in ASP

8. Scripting using VB.NET?

9. Need a help to close a word document using VB script

10. How to automate Outlook with email attachment from ASP Clinet using vb SCRIPT

11. using the serial port (COM) in a VB Script

12. Using VB Script in Visual C++ 6.0

 

 
Powered by phpBB® Forum Software