|
-
Oct 17th, 2006, 01:12 AM
#1
Thread Starter
Frenzied Member
Help with shell command!
I have tried this code
shell("c:\test.exe",vbNormalFocus)
as well as:
Dim WindowStyle As VbAppWinStyle
WindowStyle = vbNormalFocus
shell("c:\test.exe",WindowStyle)
The error I recieve is that it is expecting an '='
The last time I programmed in vb6 was 5 years ago. I have mostly programmed in .NET
I cant figure out what I am doing wrong??
kind regards
Henrik
-
Oct 17th, 2006, 01:15 AM
#2
Re: Help with shell command!
It should be
VB Code:
shell "c:\test.exe",vbNormalFocus
-
Oct 17th, 2006, 01:18 AM
#3
Re: Help with shell command!
or you can use this
VB Code:
Dim ShellReturn as long
ShellReturn=shell( "c:\test.exe",vbNormalFocus)
'IF the Retrun values is greater than it is the handle of
'of the opened window.It it is zero Then your shell application
'is not opend
-
Oct 17th, 2006, 01:47 AM
#4
Addicted Member
Re: Help with shell command!
im unsure what your looking for,, you dont need a Vbnormalfocus on the end, Your not trying to look at the file, your trying to execute it right?
VB Code:
Shell "C:\somepath" Bang, it excutes
Shell "C:\windows\explorer.exe C:\Path" , Vbwhatever for viewing
-
Oct 17th, 2006, 02:38 AM
#5
Re: Help with shell command!
 Originally Posted by danasegarane
It should be
VB Code:
shell "c:\test.exe",vbNormalFocus
Yup. Syntax error.
-
Oct 17th, 2006, 02:50 AM
#6
Re: Help with shell command!
Do you have c:\test.exe
or
have you change the file name to applicable file name?
If you are still gettin error:
What error you are getting?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|