Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

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,

B.
D--Data-Data-Temp-Cleaning-up-a-WB.pptx
D--Data-Data-Temp-Interval-and-Freq.xlsm
Avatar of [ fanpages ]
[ fanpages ]

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:

SOLVER.XLAM
FUNCRES.XLAM

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

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

User generated imageUser generated image

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.
Avatar of Bright01

ASKER

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,

B.
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect!  Thanks..... always love working with you.

B.