Can't see macros with parms in Tools -- Macros

  • Thread starter Peter Chatterton
  • Start date
P

Peter Chatterton

I can't get macros with parameters to show up in the Macros dialog box.

Is this a bug or a feature?

Or is it me?

Hope you can help,
Peter.

win2000 excel 2002
 
S

Simon Lloyd

if the macro's you have written or copied over have the title like this

Private Sub() then you will not see them in the macro's list if the
have the title
Public Sub() then they will be available in the list.

Hope this is what you were after!

Simo
 
P

Peter Chatterton

Thanks for your reply Simon, where did you find out about
Public and Private? I can't find them in the online help.


My macros mostly started off in the recorder or I edited them
into the VBE page directly.

They all were just ordinary Subs, not Public or Private.

I'm going by the example at the very bottom of p.41 of the Wrox
book on Excel 2002 VBA which has:
Sub PostInput(InputData, Target)

If I manually enter just the hidden macro name and press enter,
it tries to run but VBE says "Arg not optional".
If I enter macro11 "aa", it greys out all the buttons except Cancel,
and returns to the spreadsheet.

Thanks,
Peter.
 
S

Stephen Bullen

Hi Peter,
I can't get macros with parameters to show up in the Macros dialog box.

Is this a bug or a feature?

It's a feature. You can type in the name if you want to run it, but they
aren't listed. The assumption is that these would be called from other
procedures that pass the parameter values.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.ie
 
Top