Solved

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

Posted on 2013-05-26
5
194 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now