Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default When something in module is shown as a macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default When something in module is shown as a macro

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, 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default When something in module is shown as a macro

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default When something in module is shown as a macro

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, a écrit :

Isabelle:
Excellent description. Thanks a lot.

Prem

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert 29.08 hours (shown in decimal form) to time shown in "hh:m Nila in Florida Excel Worksheet Functions 1 September 14th 08 01:35 AM
Column of Text Shown = Total Times Shown? philcassell Excel Worksheet Functions 3 July 19th 06 07:24 AM
Named Ranges shown (or not shown) as blue means what? wdeleo Excel Worksheet Functions 0 July 8th 05 01:40 PM
Userform Shown while macro runs ExcelMonkey[_190_] Excel Programming 3 March 15th 05 05:05 PM
Addin loaded but Macro not shown Blair C. Fonville Excel Programming 2 September 8th 04 04:26 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"