Dear all,
How to open other applications such as excel, autocad,solidworks etc.?
please explain in detail with example codes?
Thankyou
Regards.
Rajamani
Printable View
Dear all,
How to open other applications such as excel, autocad,solidworks etc.?
please explain in detail with example codes?
Thankyou
Regards.
Rajamani
Try out the shell function.
VB Code:
Shell "C:\program.exe"
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.
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
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.
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