Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hiding column macro 10 28
FormulaArray VBA Issue 6 18
Filling Blank Cells 14 21
excel help 4 20
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
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.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

862 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

23 Experts available now in Live!

Get 1:1 Help Now