Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine If An Application is Already Running | Excel Programming | |||
Testing to see if windows application iis running | Excel Programming | |||
Running excel as an application | Excel Programming | |||
Test if application running? | Excel Programming | |||
Problem in running an application | Excel Programming |