Cleaning up a Workbook/Worksheet in Excel

EE Pros,

I have a very nice Macro that a number of EE Pros helped create.  Here's my challenge.  This has gone beyond my knowledge of how this works so I need some clarification.  I have two questions.

1.) Can you take a look at the Image that I have posted here and tell me if there is a way to take this macro and simply put it into the normal Worksheet/Module format?  I cannot rename, do I understand the structure of how this actually works (functions??)?  I have also included the actual Macro WB.

2.) A second question is that whenever I load a WB into Excel, I get several other VBA files that also load.  How do I change/stop this behavior?

Thank you in advance,

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
Hi B.

I use "wbk" as a three-character (Hungarian Notation) literal to indicate the associated code module is a Workbook.

"sht" I use for Worksheets.
"bas" is the prefix for (Public/Global) code modules.
"prj" is what I use for the entire VB(A) Project.

"Q_28703272" is the reference for Question #28703272.

Hence, the workbook code module for Question #28703272 is named: "wbkQ_28703272"

The code module is: "basQ_28703272".

The worksheet [Interval Frequency] is "shtInterval_Frequency"
(replacing any invalid character, like a space character, with an underscore).

Other worksheets within the same workbook would also begin with the prefix "sht".


I did not add either of the two Add-ins to your project:


These may be automatically added because your MS-Excel environment has these as "Active".

I do not have any Add-Ins active...

(MS-Excel 2013) Excel Options / Add-Ins(MS-Excel 2013) Add-Ins - Solver (not selected)

Possibly other MS-Excel / Visual Basic for Applications projects you use rely upon functions within these Add-Ins.

They do not need moving explictly to a new MS-Excel workbook.
Bright01Author Commented:
Fanpages,  Thanks!!!!  The second question is fixed thanks to your direction.  In the case of the naming convention for the Modules, is there a way to change the module Name back to Module#?  I'm trying to keep things very clean as I integrate the macro into a much larger WB.

BTW; I've asked an additional question to take the WS with the great macro you helped me with, to the next step.  Hope you will consider picking it up.  It's a challenge.... more difficult then what I normally ask for.

Thanks again,

[ fanpages ]IT Services ConsultantCommented:
To rename, simply selected the 'offending' module...

Selected basQ_28703272
Then click the [F4] key, or use the "View" / "Properties Windows" menu option...

View / Properties Windows [F4]
You will see the "Properties" window...

Properties - basQ_28703272
Change the "(Name)" from "basQ_28703272" to "Module1"...

Properties - Module1
The updated "Project" window will now show the updated name...

Project - Interval_Frequency

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bright01Author Commented:
Perfect!  Thanks..... always love working with you.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.