Macros

P

Playa

I am trying to edit and create some macros in an excel spreadsheet that was
created by someone else. There are macros for this spreadsheet but for some
reason when I go to Tools -> Macro -> Macros it doesn't show any in the list.
When I go to Tools -> Macro -> Visual Basic Editor there is code for the
macros. I have some buttons on the spreadsheet that I want to assoicate with
the macros but the buttons almost seem like they are locked, when i write
click them nothing happens but a shortcut menu should appear. Is there maybe
some special security on there I don't know about? Anyone know why I can't
access the macros or edit the buttons???
 
M

mooncrawler

Playa said:
I am trying to edit and create some macros in an excel spreadsheet that was
created by someone else. There are macros for this spreadsheet but for some
reason when I go to Tools -> Macro -> Macros it doesn't show any in the list.
When I go to Tools -> Macro -> Visual Basic Editor there is code for the
macros. I have some buttons on the spreadsheet that I want to assoicate with
the macros but the buttons almost seem like they are locked, when i write
click them nothing happens but a shortcut menu should appear. Is there maybe
some special security on there I don't know about? Anyone know why I can't
access the macros or edit the buttons???

Maybe there are only functions.
Can you mail or paste a code snippet?
 
D

Dave Peterson

You can hide the names of subroutines from that tools|macro|macros dialog a
couple different ways:

1. Add "Option Private Module" to the top of each module
2. Declaring your routine like: "Private Sub testme()"
3. Having the sub accept an argument
Private Sub testme(optional dummyParm as variant)


But since you can see the code, you can either (temporarily) change the line or
even just type in the name of the routine into that "macro name" box on the
tools|macro|macros dialog.

After you assign the button, reverse your changes--to keep the macros "hidden".
 
Top