Do not use on any
shared computer
September 6, 2008 09:42pm pdt
 
[x]
Attachment Details

Need help automating a MS Access Report --> MS Excel macro; way to make Access run Excel macro on a spreadsheet?

Tags: access, excel, report, ms
I have been tasked with creating a report in MS Access and creating an identical report in MS Excel.

I had no trouble creating/formatting the MS Access report but "exporting" it to Excel proved problematic.

I learned that it's not possible to do a quick-and-dirty export so I decided I would use an Excel macro to take the horribly out-of-whack spreadsheet that resulted from the MS Access report and output it in a more presentable format.

So, at present these are the steps in this process:

1. Run report (rpt_loans) in MS Access
2. Tools --> Office Links --> Analyze it with Microsoft Excel
3. Excel file opens (rpt_loans.xls)
4. I need to open the Excel file (called "loansrpt_macro.xls") in which I wrote the formatting Macro
5. alt+tab from loansrpt_macro.xls to rpt_loans.xls
6. hit alt+F8, make sure "All Open Workbooks" option is chosen from the "Macros in:" drop down menu
7. click "Run"

As you can see this is a bit of an involved process. It's not at all difficult for me or any minimally computer savvy person to do but because many different people in my company need to access this report in both Access and Excel format, I'm looking for a way to make the process simpler and more automated.

Any suggestions as to how I can have this done in a quicker and easier way? *Ideally*, I would like to create a button in Access that actually does steps 1 through 7 above, it runs the Access report, exports it to Excel and runs the loansrpt_macro.xls Macro on the exported file, resulting in a clean and prepared Excel spreadsheet ready to be used.

Anybody have any idea if this is possible and, if so, how I can do it?

Thanks.
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Microsoft
Question Asked By: broohaha9
Solution Provided By: harfang
Participating Experts: 2
Solution Grade: B
Views: 126
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by jefftwilley

Rank: Genius

Expert Comment by jefftwilley:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by harfang

Rank: Genius

Accepted Solution by harfang:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by broohaha9
Author Comment by broohaha9:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by harfang

Rank: Genius

Expert Comment by harfang:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34