When something in module is shown as a macro

Z

zigzagdna

Subject: Excel - When something in module is shown as a macro
I am on Excel 2007. I inherited a complex spreadsheet from someone and trying to understand it.
When I go in Visual Basic Editor, I see several modules, one module is optimization4. It has several private functions and subroutines and two public subroutines:
Optimize4 and removemarkers.

When I go in view macros in Excel file, I see two macros shown:
Optimize4
Optimization4! Removemarkers

Question, first macro is not shown as Optimization4!Optimize4, why?
I see in visual basic editor that there are other modules which also have removemarkers subroutine, maybe that’s why it is preceded by Optimization4! While there is only one Optimze4.
Is my understanding correct? Appreciate your insight.

Thanks a lot.





I
 
I

isabelle

hi,

you should know that there "Module" and "Class Module"
"Class module" being sheets in the workbook, a workbooks or a class module

if the subroutine is placed in a class module
you will see:

MyClassModule.Macro1
or
Sheet1.Macro1
or
ThisWorkbook.Macro1

if the subroutine is placed in a module
you will see:

Macro1

if the same name for a subroutine appears in two different modules.
you will see:

Module1.Macro1
Module2.Macro1

--
isabelle



Le 2012-09-20 22:23, (e-mail address removed) a écrit :
Subject: Excel - When something in module is shown as a macro
I am on Excel 2007. I inherited a complex spreadsheet from someone and trying to understand it.
When I go in Visual Basic Editor, I see several modules, one module is optimization4.

It has several private functions and subroutines and two public subroutines:
Optimize4 and removemarkers.

When I go in view macros in Excel file, I see two macros shown:
Optimize4
Optimization4! Removemarkers

Question, first macro is not shown as Optimization4!Optimize4, why?
I see in visual basic editor that there are other modules which also have removemarkers subroutine,

maybe that’s why it is preceded by Optimization4! While there is only one Optimze4.
 
Z

zigzagdna

Subject: Excel - When something in module is shown as a macro I am on Excel 2007. I inherited a complex spreadsheet from someone and trying to understand it. When I go in Visual Basic Editor, I see several modules, one module is optimization4. It has several private functions and subroutines and two public subroutines: Optimize4 and removemarkers. When I go in view macros in Excel file, I see two macros shown: Optimize4 Optimization4! Removemarkers Question, first macro is not shown as Optimization4!Optimize4, why? I see in visual basic editor that there are other modules which also have removemarkers subroutine, maybe that’s why it is preceded by Optimization4! While there is only one Optimze4. Is my understanding correct? Appreciate your insight. Thanks a lot. I


Isabelle:
Excellent description. Thanks a lot.

Prem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top