Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default manipulate other program using excel macro

I create a report in program, which has the capability to "Download to
Excel". The result is a windows document that looks like xl and has
some of the same commands. I then copy this data, select the workbook
[XL2003] I want to paste the data to, and run simple macro that
appends the data to an excel database. Is there anyway to automate the
generating of the report [have to select which report, then the start
date and end date, run report, then "Downolad to Excel".]
Also , I have several pivot tables accessing the database data. But
when i add more data, the pivot tables do not update. what must i do
to make them update with the new data?

Thanks,

Tonso
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default manipulate other program using excel macro

In message
..com of Fri, 30 Dec 2011 09:49:49 in microsoft.public.excel.programming
, Billy writes
I create a report in program, which has the capability to "Download to
Excel". The result is a windows document that looks like xl and has
some of the same commands. I then copy this data, select the workbook
[XL2003] I want to paste the data to, and run simple macro that
appends the data to an excel database. Is there anyway to automate the
generating of the report [have to select which report, then the start
date and end date, run report, then "Downolad to Excel".]


Possibly! You need to find out if "program" can be automated.

An example of a program which can partially be automatically controlled
is the browser Internet Explorer.

A partial example of such a control, which I can run in VBA from Excel
is

Public sub foo()
Dim IE as object

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
end sub

That opens Internet Explorer and makes the window visible.
I won't bother showing any more. You can Google if interested.

Also , I have several pivot tables accessing the database data. But
when i add more data, the pivot tables do not update. what must i do
to make them update with the new data?


Once you have learnt if it is possible to automate access to "program",
it should be easy to do the rest of your requirements.

If I had your requirement, I would leave running "program" as a manual
exercise and write code to read the data into Excel and update the pivot
tables.

In Excel 2003, Tools/Macro/Record a Macro allows you to translate manual
operations into VBA code. It is not 100%, but I would say it is in the
high nineties. Start by doing a small, tedious operation which you fully
understand and extend from there. One gotcha is that you have no access
to the mouse when recording macros; you have to use equivalent keyboard
shortcuts. Another is that Microsoft views VBA code as insecure. You
have to persuade it to accept your code. Other Excel versions have
similar capabilities with different access mechanisms - I have heard the
word ribbon used in such contexts.


Thanks,

Tonso


I suggest you try to find out how to do something simple with macros,
which solves part of your problem. When you hit walls, ask specific
questions if you can't find solutions with Google.

OTOH, you can ask a specific question and somebody may roll you a
solution. It may serve, but you will learn little.
--
Walter Briscoe
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default manipulate other program using excel macro

On Dec 30, 2:58*pm, Walter Briscoe
wrote:
In message
.com of Fri, 30 Dec 2011 09:49:49 in microsoft.public.excel.programming
, Billy writes

I create a report in program, which has the capability to "Download to
Excel". The result is a windows document that looks like xl and has
some of the same commands. I then copy this data, select the workbook
[XL2003] I want to paste the data to, and run simple macro that
appends the data to an excel database. Is there anyway to automate the
generating of the report [have to select which report, then the start
date and end date, run report, then "Downolad to Excel".]


Possibly! You need to find out if "program" can be automated.

An example of a program which can partially be automatically controlled
is the browser Internet Explorer.

A partial example of such a control, which I can run in VBA from Excel
is

Public sub foo()
* * Dim IE as object

* * Set IE = CreateObject("InternetExplorer.Application")
* * IE.Visible = True
end sub

That opens Internet Explorer and makes the window visible.
I won't bother showing any more. You can Google if interested.

Also , I have several pivot tables accessing the database data. But
when i add more data, the pivot tables do not update. what must i do
to make them update with the new data?


Once you have learnt if it is possible to automate access to "program",
it should be easy to do the rest of your requirements.

If I had your requirement, I would leave running "program" as a manual
exercise and write code to read the data into Excel and update the pivot
tables.

In Excel 2003, Tools/Macro/Record a Macro allows you to translate manual
operations into VBA code. It is not 100%, but I would say it is in the
high nineties. Start by doing a small, tedious operation which you fully
understand and extend from there. One gotcha is that you have no access
to the mouse when recording macros; you have to use equivalent keyboard
shortcuts. Another is that Microsoft views VBA code as insecure. You
have to persuade it to accept your code. Other Excel versions have
similar capabilities with different access mechanisms - I have heard the
word ribbon used in such contexts.



Thanks,


Tonso


I suggest you try to find out how to do something simple with macros,
which solves part of your problem. When you hit walls, ask specific
questions if you can't find solutions with Google.

OTOH, you can ask a specific question and somebody may roll you a
solution. It may serve, but you will learn little.
--
Walter Briscoe


Walter,

Thank you very much. I actually have the code for pasting the data and
appending it to the xl database, but not for manipulating the other
program. I figured it would require a level of expertise beyond mine,
but was curious as to how it might be accomplished. I agree that the
simplest solution, perhaps the best, would be to continue as is, that
is, the data being manually generated in the other program, then
copied to the clipboard. At that point, my macro takes over. In any
event, thank you for taking the time to explain the situation to me.

Tonso
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
Using C# to manipulate Excel HSalim Excel Programming 0 January 22nd 09 04:49 PM
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
How to either write the macro or manipulate the function Beth Excel Programming 1 April 2nd 05 10:56 PM
Manipulate Excel Bich Leu Excel Programming 3 August 25th 03 11:57 PM


All times are GMT +1. The time now is 08:07 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"