View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Macro, Module, function, sub and This workbook and sheets ?

Hi Jamie,
I think you are making up your own definition for macro.

The HELP includes lots of uses of the word macro that that
do not require that the name appear in the macro dialog box.

You have very specifically excluded a public subroutine with a parameter
as they will not appear in the macro dialog box, but you can type the name
into the macro dialog box and run it from the spreadsheet like
any other macro appearing in the dialog box.

From HELP:
The Run method returns whatever the called macro returns.
Objects passed as arguments to the macro are converted to
values (by applying the Value property to the object). This
means that you cannot pass objects to macros by using the Run method.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jamie Collins" wrote in message om...
"David McRitchie" wrote ...

Hi Hari,
For item #1 and #3 Chip Pearson has a page on the
the difference between a Macro and a Function, it should
clear up some confusions. (probably also #5)
Macros And Functions (Functions as Opposed to Macros)
http://www.cpearson.com/excel/differen.htm


The suggestion seems to be that 'Sub' is synonymous with 'Macro'. I'd
make the distinction that a macro must appear in the 'Macro' dialog
(Tools, Macro, Macro) i.e. must be a parameterless public Sub in a
public module, being a standard module with no 'Option Private Module'
statement or an object module (e.g. ThisWorkbook code module).

Jamie.

--