By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,806 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

call another application from VB.NET

P: n/a
heya,
is it possible to launch another application (such Excel, IE browser) from VB.NET

in Java, we can use Runtime.getRuntime().exec

thanks
Nov 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
In article <b0**************************@posting.google.com >, hristo wrote:
heya,
is it possible to launch another application (such Excel, IE browser) from VB.NET

in Java, we can use Runtime.getRuntime().exec

thanks


In VB.NET you can either use the built in Shell command - or if you need
more control over the process you can use the System.Diagnostics.Process
class.

Nov 20 '05 #2

P: n/a
EXAMPLE:

dim str as string
str = "C:\WINNT\NOTEPAD.EXE"
x = shell(str, Appwinstyle.maximizedfocus)

"hristo" <hr********@yahoo.com> wrote in message
news:b0**************************@posting.google.c om...
heya,
is it possible to launch another application (such Excel, IE browser) from VB.NET
in Java, we can use Runtime.getRuntime().exec

thanks

Nov 20 '05 #3

P: n/a
For just opening an application, you can use
System.Diagnostics.Process.Start().

Microsoft Office applications (Excel, Word, etc.) expose an object model
that gives you more detailed control over them. E.g., you can use VB or C#
to start Excel, open a particular workbook, do something with the workbook,
and then shut Excel down.

http://msdn.microsoft.com/vbasic/usi...e/default.aspx
"hristo" <hr********@yahoo.com> wrote in message
news:b0**************************@posting.google.c om...
heya,
is it possible to launch another application (such Excel, IE browser) from VB.NET
in Java, we can use Runtime.getRuntime().exec

thanks

Nov 20 '05 #4

P: n/a
is it possible to launch another application (such Excel, IE browser) from VB.NET


System.Diagnostics.Process.Start()

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #5

P: n/a
EP
If your trying to automate Excel or word you can add a
reference of the object to the project. Then declare a
variable of that type. You will then have exposure to all
the properties.

Dim exExcel = new Excel.Application

You will then have access to all the properties.
exExcel.??????
-----Original Message-----
heya,
is it possible to launch another application (such Excel, IE browser) from VB.NET
in Java, we can use Runtime.getRuntime().exec

thanks
.

Nov 20 '05 #6

P: n/a
* hr********@yahoo.com (hristo) scripsit:
is it possible to launch another application (such Excel, IE browser) from VB.NET


You can use 'Shell' or 'System.Diagnostics.Process.Start'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

P: n/a
Hi All

Wow, what a race!! And in the lead by a short nose - Tom Shelton first
past the post, with Don Senda (the Italian thoroughbred) a close second.

;-))

Regards,
Fergus
Nov 20 '05 #8

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
with Don Senda (the Italian thoroughbred) a close second.


;-)))

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.