Openning apps.

Posted by: Ntd

Openning apps. - 10/08/03 11:52 AM

Does anyone know how to open apps from vb?
Posted by: BackSlash

Re: Openning apps. - 10/09/03 02:50 AM

i take it to mean you want to be able to open other programs from your program. if so, you use Shell(). for instance, if you wanted to open up notepad you would do Shell("C:\windows\notepad.exe") hope that helps
Posted by: Ntd

Re: Openning apps. - 10/09/03 04:25 AM

Thanks Mate!!!!!!!!!!!!!!!! thats what i wanted to do!!!!!!!
Posted by: Ntd

Re: Openning apps. - 10/09/03 06:20 AM

One more thin how do set parameters eg for ie, how do u make it open ie at a certain website?
Posted by: SilentRage

Re: Openning apps. - 10/09/03 10:21 AM

Include the commandline parameters in the Shell string like so:

Shell("C:\Program Files\Internet Explorer\iexplore.exe http://serialcoders.sytes.net")

In case there's confusion with commandline arguments and the path you can add double quotes:

Shell("""C:\Program Files\Internet Explorer\iexplore.exe"" http://serialcoders.sytes.net")
Posted by: Ntd

Re: Openning apps. - 10/10/03 06:45 AM

Shell (File1.Path & File1.FileName)
Why doesn't it work?
Posted by: SilentRage

Re: Openning apps. - 10/10/03 07:52 AM

I don't know. I have no idea what "File1" is.
Posted by: bosky101

Re: Openning apps. - 10/10/03 02:30 PM

can u say..open an app and send keystrokes as default values as well...like sending to a programs log in .to make it an auto login ?
Posted by: SilentRage

Re: Openning apps. - 10/10/03 05:25 PM

yes, but there's easier ways to do that.
Posted by: alchemist

Re: Openning apps. - 10/14/03 10:29 AM

Quote:
Originally posted by NTD .:
Shell (File1.Path & File1.FileName)
Why doesn't it work?
Shell (File1.Path & "\" & File1.FileName)
you can always debug.print File1.Path & "\" & File1.FileName
and see what its actually outputting...

also to send keys: sendkeys "{enter}"
or sendkeys "{home}+{end}"
sendkeys "abcd"

'Backspace {BS}
'Break {BREAK}
'Caps Lock {CAPSLOCK}
'DELETE {DEL}
'Down Arrow {DOWN}
'END {END}
'ENTER {ENTER} or ~
'Escape {ESC}
'Help {HELP}
'Home {HOME}
'Insert {INS}
'Left Arrow {LEFT}
'Num Lock {NUMLOCK}
'Page Down {PGDN}
'Page Up {PGUP}
'Print Screen {PRTSC}
'Right Arrow {RIGHT}
'Scroll Lock {SCROLLLOCK}
'Tab {TAB}
'Up arrow {UP}
'F1 - F16 {F1} - {F16}
'Shift +
'Ctrl ^
'Alt %
Posted by: BackSlash

Re: Openning apps. - 10/15/03 02:52 AM

ntd, it should be Shell(file1.path & "\" & file1.filename)

you forgot the backslash in the middle. also, you have to make sure a file is actually selected in the file list box.
Posted by: alchemist

Re: Openning apps. - 10/17/03 05:32 PM

ahh...isnt that what i just said? o_O