Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default running another application from VBA


Hello,

I m working on a macro that will basically sort, filter and subtota
the data. The data to be used is available in another applicatio
wherein i can run a query and get the data in excel friendly format. t
get such data i need to click some options manually which i want t
avoid

Can anyone suggest if there any function or command so that i can ru
the application other than excel and get data from such and manipulat
it in excel.

Such application is not registered in objects library if excel

--
sudhac
-----------------------------------------------------------------------
sudhaca's Profile: http://www.excelforum.com/member.php...fo&userid=2989
View this thread: http://www.excelforum.com/showthread.php?threadid=49602

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default running another application from VBA


Hello Sudhaca,

You can start any program using the Shell command. The program fil
type (extension) must be registered for this to work. Windows uses th
extension to look up the program that will open the file.

SHELL COMMAND EXAMPLE
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator

WINDOWS 200
To create a file association for an unassociated file type:
1. In My Computer or Windows Explorer, right-click a file with th
extension whose association that you want to create, and then clic
Open. Or, double-click the file.

2. In the Open With dialog box, choose a program to associate with thi
file name extension. Click the Always use the selected program to ope
this kind of file option.


WINDOWS X
To create file association:
1. Right-click a file with the extension that you want to change, an
then click Open, or double-click the file.

2. Windows XP displays a dialog box that indicates that no program i
associated with this file. The dialog box offers two choices fo
creating an association:• Use the Web service to find the appropriat
program
• Select the program from a list
Unless you want to find and download software that opens this fil
type, the best choice is to select the program from a list.


3. Windows displays a dialog box that displays programs that ar
installed on the computer. If the program that you want to use for thi
file type is not listed, click Browse to locate the appropriat
software. Select the Always use the selected program to open this kin
of file check box.

Suncerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49602

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default running another application from VBA


Hi Leith,

Thanks for ur response.
I was not very clear in informing the help i need in my first post
Please go through below.

I have to use the data which will be genereated from a special databas
application(non microsoft) by running a query. That application i
registered in the reference library of VBA.
I need a code which will run a query executable to that particula
application only. The query file name has extension of ".rep".
From that query i can export the data into excel and manipulate it.

I think there are some commands like 'set object' 'set class' dat
souurce="provider" etc.

I want to know how to use those commands.

Regards
Sudhanshu:

--
sudhac
-----------------------------------------------------------------------
sudhaca's Profile: http://www.excelforum.com/member.php...fo&userid=2989
View this thread: http://www.excelforum.com/showthread.php?threadid=49602

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default running another application from VBA

Is it possible to execute excel from within a execl vba file? Problem I am
facing is a computer that does not have excel on it. Have excel on cd with
file. Need to be able to run and safe work done on file. Feel that file can
be saved onto hd of computer by chging attribs. Its the loading and running
of excel that has got me.
Thanks
Curt

"Leith Ross" wrote:


Hello Sudhaca,

You can start any program using the Shell command. The program file
type (extension) must be registered for this to work. Windows uses the
extension to look up the program that will open the file.

SHELL COMMAND EXAMPLE:
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator

WINDOWS 2000
To create a file association for an unassociated file type:
1. In My Computer or Windows Explorer, right-click a file with the
extension whose association that you want to create, and then click
Open. Or, double-click the file.

2. In the Open With dialog box, choose a program to associate with this
file name extension. Click the Always use the selected program to open
this kind of file option.


WINDOWS XP
To create file association:
1. Right-click a file with the extension that you want to change, and
then click Open, or double-click the file.

2. Windows XP displays a dialog box that indicates that no program is
associated with this file. The dialog box offers two choices for
creating an association:€¢ Use the Web service to find the appropriate
program
€¢ Select the program from a list
Unless you want to find and download software that opens this file
type, the best choice is to select the program from a list.


3. Windows displays a dialog box that displays programs that are
installed on the computer. If the program that you want to use for this
file type is not listed, click Browse to locate the appropriate
software. Select the Always use the selected program to open this kind
of file check box.

Suncerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=496024


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default running another application from VBA


Hello did any one had achance to look on below.

Please advise me.


--
sudhaca
------------------------------------------------------------------------
sudhaca's Profile: http://www.excelforum.com/member.php...o&userid=29892
View this thread: http://www.excelforum.com/showthread...hreadid=496024



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default running another application from VBA

Sudhanshu,
You can run a query from Excel. Check out DataGet External DataNew
Database Query.
Recording a macro whilst you do this will give the basis of the VBA code.

NickHK

"sudhaca" wrote in
message ...

Hi Leith,

Thanks for ur response.
I was not very clear in informing the help i need in my first post.
Please go through below.

I have to use the data which will be genereated from a special database
application(non microsoft) by running a query. That application is
registered in the reference library of VBA.
I need a code which will run a query executable to that particular
application only. The query file name has extension of ".rep".
From that query i can export the data into excel and manipulate it.

I think there are some commands like 'set object' 'set class' data
souurce="provider" etc.

I want to know how to use those commands.

Regards
Sudhanshu:)


--
sudhaca
------------------------------------------------------------------------
sudhaca's Profile:

http://www.excelforum.com/member.php...o&userid=29892
View this thread: http://www.excelforum.com/showthread...hreadid=496024



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default running another application from VBA

Follow shell command Am at a loss? computer has msworks so does not read
excel need to pull excel up from a cd to run. Can this be done from a cd. My
program is also on cd. This can be saved on machine by chg attrb.
Any help greatly appreciated.
Curt


"Leith Ross" wrote:


Hello Sudhaca,

You can start any program using the Shell command. The program file
type (extension) must be registered for this to work. Windows uses the
extension to look up the program that will open the file.

SHELL COMMAND EXAMPLE:
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator

WINDOWS 2000
To create a file association for an unassociated file type:
1. In My Computer or Windows Explorer, right-click a file with the
extension whose association that you want to create, and then click
Open. Or, double-click the file.

2. In the Open With dialog box, choose a program to associate with this
file name extension. Click the Always use the selected program to open
this kind of file option.


WINDOWS XP
To create file association:
1. Right-click a file with the extension that you want to change, and
then click Open, or double-click the file.

2. Windows XP displays a dialog box that indicates that no program is
associated with this file. The dialog box offers two choices for
creating an association:€¢ Use the Web service to find the appropriate
program
€¢ Select the program from a list
Unless you want to find and download software that opens this file
type, the best choice is to select the program from a list.


3. Windows displays a dialog box that displays programs that are
installed on the computer. If the program that you want to use for this
file type is not listed, click Browse to locate the appropriate
software. Select the Always use the selected program to open this kind
of file check box.

Suncerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=496024


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default running another application from VBA


Hello, The system which i will use is specifically used in the company
work for.However, the good news is thati have found that sam
application is registered into the reference library excelVBA a
object.

Now i dont know how to activate the object and use the query file whic
can be run only onto that application.

Can anyone please guide me how can I write the code to activate
existing object in VBA so that macro will work as:
1) Activate the busobj(it is shown as library
2) activate the query(it is shown as Classes


Thanks
Sudhansh

--
sudhac
-----------------------------------------------------------------------
sudhaca's Profile: http://www.excelforum.com/member.php...fo&userid=2989
View this thread: http://www.excelforum.com/showthread.php?threadid=49602

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine If An Application is Already Running BobT Excel Programming 1 March 31st 05 07:59 PM
Testing to see if windows application iis running Mark \(InWales\)[_21_] Excel Programming 3 January 29th 05 05:10 PM
Running excel as an application John[_98_] Excel Programming 8 December 20th 04 06:31 PM
Test if application running? Chuck Excel Programming 1 December 7th 04 03:27 PM
Problem in running an application Mohanasundaram[_2_] Excel Programming 0 August 5th 03 08:26 AM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"