Viewing Macro..

  • Thread starter Thread starter shawn
  • Start date Start date
S

shawn

Is there a way to view a VBS macro without running it? Someone sent me a
macro, but I don't know that it can be trusted. I do want to run it, I did
scan it with Norton and it found nothing, but Excel warns me against opening
it.
 
Hi,

Unless its protected, you can press Alt+F8, select it from the list and
click Edit. Of course if you don't know VBA, you probably won't know if its
safe or not. Of course you could post the code to the newgroup.

You first line of defense is to consider the source, do you trust the person
who sent you the file?
 
Press Alt-F11 to get into the VBE and then click on the Module to see
the code.

Mind you, if you didn't know this then how can you determine if the
code is malicious?

Excel will warn you that a workbook contains a macro if your security
settings are set to Medium, but it does not scan through the code to
warn you that it is a bit suspect.

Hope this helps.

Pete
 
Hi,

You need to sign click to open the Modules folder but you need to
double-click the module within to see the code.
 
I think we were both saying the same thing - if the OP didn't know how
to view the code (and was therefore presumably not very experienced
with VBA), then what's the point in him doing so if he wouldn't be
able to understand it?

It seemed to me that he was getting the warning message to enable/
disable macros and didn't know what it meant.

Pete
 
I knew what the message meant. I just don't know the person who sent me the
VBA file. I asked here for help on a post titled "Excel Calculator". Someone
sent me a file which has a RUN button. It automatically calculates how many
stamps I need in each denomination based on how much postage I need. I
figured if I can view some code I might understand it since I program a
little.. not enough to understand everything, but maybe enough to say hey
this isn't a bad thing.
 
I think pressing ALT-F11 helps a lot. Because I can see the code and
understand most of it and can see it doesn't do anything malicious. I think
I'll trust it, try it out, and thank the person.

Press Alt-F11 to get into the VBE and then click on the Module to see
the code.

Mind you, if you didn't know this then how can you determine if the
code is malicious?

Excel will warn you that a workbook contains a macro if your security
settings are set to Medium, but it does not scan through the code to
warn you that it is a bit suspect.

Hope this helps.

Pete
 
Okay, but take a look at Roger Govier's solution in your Excel
Calculator thread - no macro needed (and the same approach could be
used for coin analysis).

Pete
 
Back
Top