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
Solved

Personal.xls run a test on opening other sheets

Posted on 2013-06-12
8
279 Views
Last Modified: 2013-06-14
I want an ON_OPEN macro to run, not from code embedded in 'this workbook' but from personal.xls. Is this possible?
0
Comment
Question by:Grizzler
  • 5
  • 2
8 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 39242194
Yes, but please be more specific.  Are you saying, "whenever I open *any* file in Excel, run a macro from my Personal.xls"?
0
 

Author Comment

by:Grizzler
ID: 39242220
When I open any workbook, I want a macro to fire. The sub will run tests against active workbook and prompt user accordingly. Want to trigger both from file open or double click to open from folder.
0
 

Author Comment

by:Grizzler
ID: 39242259
short answer "YES"
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 

Author Comment

by:Grizzler
ID: 39242270
current target excel2003
0
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 500 total points
ID: 39246180
Hi,

To expand on matthewspatrick's response, save the attached Add-in file in an XLSTART folder.

BFN,

fp.
Q-28155488.xla
0
 

Author Closing Comment

by:Grizzler
ID: 39246217
Perfect! Thanks....
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39246258
You're welcome :)
0
 

Author Comment

by:Grizzler
ID: 39248237
So, if I might trouble you a bit further.... Looking for design strategy best practices....

In the past, I coded single purpose workbooks that contained code in embedded modules.
Works fine for "enter data, do stuff vba, output data", on locked sheet where the user doesn't alter the sheet structure.

Recently I started using Personal.XLS to add global functionality for Excel.

On another on going project, I have some legacy (system not by me) sheets that use internal and external links to get data and cross populate. The sheets are unlocked and edited freely by novices and people of some skill, alike. As you can imagine, the sheets are a mess. Too many issues to list....

One of my goals is to remove all the link formulas and replace them with a codebase that gets and places data and fixes errors. This is part of a project to migrate to an actual database soure, rather than Index/Match or Vlookup. The scale at which we have applied these methods is nearing critical mass and the fragile nature of what we are doing is becoming more and more evident to the people who can facilitate change.

I am going to remove as much code as possible from workbooks and make it built in....

Any way the simple generic question....

Advantages using XLA vs Personal.XLS?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 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