PC Review


Reply
Thread Tools Rate Thread

When something in module is shown as a macro

 
 
zigzagdna@yahoo.com
Guest
Posts: n/a
 
      21st Sep 2012
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
 
Reply With Quote
 
 
 
 
isabelle
Guest
Posts: n/a
 
      21st Sep 2012
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 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.
> Is my understanding correct? Appreciate your insight.
>
> Thanks a lot.
>
>
>
>
>
> I
>

 
Reply With Quote
 
 
 
 
zigzagdna@yahoo.com
Guest
Posts: n/a
 
      21st Sep 2012
On Thursday, September 20, 2012 10:23:34 PM UTC-4, (unknown) wrote:
> 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
 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      21st Sep 2012
you're welcome! ..feedback is always appreciated!

note that if you write a Private Sub(), this one is not shown in view macros in Excel file

also i suggest you as read the following subjects: Function(), Sub(), Private Sub(), Public Sub()
http://www.excelfunctions.net/VBA-Fu...broutines.html

--
isabelle


Le 2012-09-21 00:51, (E-Mail Removed) a écrit :
>
> Isabelle:
> Excellent description. Thanks a lot.
>
> Prem
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a public module macro in private module macro emmanuel Webmaster / Programming 1 13th May 2011 06:34 PM
Convert 29.08 hours (shown in decimal form) to time shown in "hh:m Nila in Florida Microsoft Excel Worksheet Functions 1 14th Sep 2008 01:35 AM
Column of Text Shown = Total Times Shown? philcassell Microsoft Excel Worksheet Functions 3 19th Jul 2006 07:24 AM
line height (or something similar) difference not shown? Keith G Hicks Microsoft Word Document Management 4 5th Oct 2005 02:35 PM
Named Ranges shown (or not shown) as blue means what? =?Utf-8?B?d2RlbGVv?= Microsoft Excel Worksheet Functions 0 8th Jul 2005 01:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 AM.