Solved

Excel Macros in a workbook that gets generated each month

Posted on 2014-11-12
4
196 Views
Last Modified: 2014-11-12
What's the best way to handle this situation? A user has data that is exported to Excel each month from another system - the data changes each time. He created a macro that he wants to run on the data each month. Is it better to have a shell workbook (blank) containing only the macro and copy/paste the data into this workbook, or is it better to copy/paste the macro into the workbook already containing the data, which will be different each time the report is run? Or is there even a better way to handle this? Just looking for some suggestions. Thanks.
0
Comment
Question by:esu4236
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40437918
Have the macro in a separate workbook - maybe even in your Personal Macro Workbook - and then your data workbook does not need any code at all (if your code is workbook independent).
0
 

Author Comment

by:esu4236
ID: 40437944
I don't want it in my Personal Macro workbook because I may have someone else working on this file as well. So they need to be able to get to the macro.
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40437947
Therefore, have it in a separate workbook.

Have it open when you want to run the macro.

Then run the macro from your data workbook.
0
 

Author Closing Comment

by:esu4236
ID: 40437992
Makes sense. Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question