Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and VBscript

Status
Not open for further replies.

skipagency1

Programmer
May 21, 2004
7
IT
Hi

I know that is possible to launch a VBscript (.vbs) from VB passing some param using shellexecute

but my question is if is possible to receive one or more param back from the launched vbs?

Thanks in advance and bye-bye

 
Just to more clear

My intention is to launch dinamically from VB one or more function written inside a text file: I want to pass them some input param and of course receive some param back.

I thoiugh to use vbscript but maybe there is a better solution

Thanks again
 
Go to the Project menu
References
Browse
C:Your Windows Dir
If you are running 2000/XP go to the system32 else go to system
then select wscript.exe
Click open
click ok

Now press F2 which should open your Object Browser
On the top combo box select it should be called "IHost"
then listed there should be all of the vbscript functions

in order to use them in the vb code use

Dim IHost As New Shell

then you should beable to use all of the commands listed in the object browser under IHost

----------------

I would not recommend this though vb and vba are not to different I would just program it in vb if you are going to have a vb program anyway

I don't know vba that well but I'm sure if I saw it I would understand it - so if you need help converting it to vb feel free to ask

%, 2004
 
Hi Percent

Thanks for your answer

I suupose that
Dim IHost As New Shell
should be
Dim IHost As New IHost_Class

I tried to do it but i don't arrive to do nothing.

Could you please show me a sample

Regards
 
Dim IHost As New Shell
is used to tell vb to integrade the IHost commands as if they were vb commands

I will try to give you an example when I get on my computer with vb

%, 2004
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top