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

Excel Macro recorder keeps including Activeworkbook.sheet (xxxxx).  How do I prevent that?

Posted on 2013-05-26
5
204 Views
Last Modified: 2014-05-23
Hi Folks,

I have an excel 2010 user who's not adept at modifying the macro VBA code.  This person uses the macro recorder to create fairly simple macros in the 5 to 15 step range.

The issue is that, when she records the macro (to the personal.xlsb), it is including the name of the workbook and sheet name that she was using when she created / recorded the macro.

So, when she goes to apply this macro to another spreadsheet workbook (entirely different file), it fails because the workbook / sheet names are different.

This does not happen with another user.  So, the question is, short of editing the VBA generated by the macro recorder, how do I prevent the macro recorder from including the active workbook / sheet info?

THanks very much.

Dave
0
Comment
Question by:dgriswold1
  • 2
5 Comments
 
LVL 35

Accepted Solution

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

Does this happen if the inexperienced user creates the macro within ("Store macro in") "This Workbook" (rather than "New Workbook" or "Personal Macro Workbook") as specified upon the "Record macro" window?

Once stored within "This Workbook", the recorded macro code can be cut'n'pasted to the "Personal Macro Workbook".

However, I appreciate from what you have said, that this may (also) be a non-trivial task for somebody with limited experience.

BFN,

fp.
0
 

Author Comment

by:dgriswold1
ID: 39199801
Thanks for the suggestion, I'll go and test it now...much appreciated.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39201429
Was your test successful, Dave?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

837 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