English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I dont need Shell command.. Coz i m tryin to run a vbs file !!!

HELPPP FAST!

2006-09-21 14:34:20 · 4 answers · asked by top2000no 1 in Computers & Internet Programming & Design

The Answer was
------------------------------------------------------
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
Dim strVBSPath As String

strVBSPath = "C:\MyVBSscript.vbs"
ShellExecute Me.hwnd, vbNullString, strVBSPath, vbNullString, "C:\", 0
End Sub

2006-09-21 14:49:06 · update #1

4 answers

Your question is not clear enough for me to give you the precise answer. But here, I answer it anyway. I just hope that it's what your looking for:

1) To run a file from VB without using the 'Shell' command, you can use 'ShellExecute'. It's an API command. You can download all download all the API command here: http://allapi.net

2) If you just want to run a project in VB IDE, go to 'Run' menu and select 'Start' or just press the shortcut key, F5.

For free VB source codes, visit: http://smartcoder.awardspace.com


KaBalweg
http://smartcoder.awardspace.com

2006-09-21 14:55:59 · answer #1 · answered by dabsani 3 · 0 0

I don't excatly get your question, but if you want to run your application jsut press f5 and it should start, depending on what vb you have.

If you want to do a function or something just declare the funtion and then type the function where you want it to be run.

or, if you want your vb application to do something... you can use this

Fileopen(1, "file-location", openmode.output)

2006-09-21 21:40:52 · answer #2 · answered by Mongs 3 · 0 0

WshShell.run

2006-09-21 21:45:01 · answer #3 · answered by itguru5354 1 · 0 0

Read about "shell" command

2006-09-21 21:43:07 · answer #4 · answered by Dr M 5 · 0 0

fedest.com, questions and answers