|
-
Aug 13th, 2004, 01:59 PM
#1
Thread Starter
Addicted Member
How to open other application from VB?
Dear all,
How to open other applications such as excel, autocad,solidworks etc.?
please explain in detail with example codes?
Thankyou
Regards.
Rajamani
-
Aug 13th, 2004, 02:01 PM
#2
Addicted Member
Try out the shell function.
To use it you'll need the filename and path, so there may be other better ways. It also has several other options, so take a look at the help files for it too.
-
Aug 13th, 2004, 02:09 PM
#3
Thread Starter
Addicted Member
still I have doubt?
Dear imbue,
thank you for your reply. But I have another doubt, in one system "xxx.exe" is saved on "c:" and in another system in "d:", If I use the same program in another system (I have used shellll command) it does not work.
How to solve this?
Thanks
Reg
Rajamani
-
Aug 13th, 2004, 02:41 PM
#4
Addicted Member
I have no idea of how to do that without either asking the user where it's installed or getting the path for the executable via a file it is associated with, like using the FindExecutable API.
It is also probably possible that you could find where it's installed by looking at the uninstall info, but this could easily chage from version to version aswell.
Or you could search the first time you need the filename and path and then rember where it was the next time, you have a lot of options here.
-
Aug 13th, 2004, 02:58 PM
#5
Here is one way.
VB Code:
On Error Resume Next
Shell "C:\xxx.exe"
If Err.Number = 53 Then
Err.Clear
Shell "D:\xxx.exe"
End If
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
|