please explain

  • Thread starter Thread starter Jim Madsen
  • Start date Start date
J

Jim Madsen

Greetings--

I am somewhat familiar with macros and VBA.
Last night I received an excel file (containing a receipt) from a local
government agency. When I tried to open it, Excel said it contained
macros. I made sure my virus software was up to date and scanned it--no
viruses.

I tried to open it and I selected disable macros (so I could look at
what the macros would do anyway. Excel said the file had Excel 4.0
macros, which could not be disabled. So I opened it with macros
enabled, and looked at the names of the macros--looks like the macros
(about ten names) are to format the spreadsheet and put all the payment
data in the correct cells. So I selected visual basic editor and tried
to open a macro and a message box came up "invoice.xlt, password
required". Any clues what that's all about? Why is a file (assume
that's a template supplied by the .xls file) on my computer password
protected?

Jim
 
Easiest, most glib answer is, because someone password protected it. *smirk

But really, it may have been password protected for a number of reasons. First of all is so that the common user is not able to look at the code and "steal" something that may be considered "proprietary" if the programmer felt that they had done work that is trusted and yet not to be disseminated. Another reason to password protect the code, is so that the very general user, is unable to change the code. At least two things are considered when able to change the code, one is that by PW protecting it, malicious code can not be easily inserted, the other is that if the lay user accidentally changes a line of code in the program than it could "break" the code, and make the program useless. (This is something I have run across when writing programs that are used by others.) It can be problematic, that if God forbid, an error occurs, the user may try to fix the problem say by removing the "offending" line. (I sure use a lot of quotes.

As for why some random file is password protected, well it the .xlt file is apparently a part of the program group that you have. I'm unfamiliar with what a .xlt file is, and don't recall using Excel 4.0, so not sure if .xlt files were part of Excel 4.0 or not. At any rate, basically if you have concerns about the content of the code, you will need to contact the person(s) that wrote it/are responsible for it, to find out what you are wanting. I know the government works in two ways, one trusting the work that others have done, and moving forward, and two having a questioning attitude like you have, to ensure that what you are using is correct and does not contain anything subversive

But like I said at the beginning, why is there a password on a file on your computer? Because the file was password protected then put on your computer. :)

Merry Christmas
 
For what its worth, Oracle comes up with Excel 4.0 macros, it may be that
the file comes from Oracle.
 
Back
Top