View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA Project - Second opinion please!

I wouldn't expect most users feel comfortable inside the VBE modifying code.

I don't quite understand what you're doing, but if you allow the users to break
the rule about number of hardcopies, why make it difficult?

Why not just let them do it without any interference?



Danny wrote:

Hi Dave,

The reason why I need it is, I let my officemates use my workbook. In order
for them to print is, they have to have a "printing password" that I provide.

They usually print about 26 worksheets. Everytime they have to print a
worksheet,
they have to use the password.

I'd like to change the Before Print Event (from Mr. Chip Pearson's website)
to

"Cancel = False", but is limited to print 30 times so, they won't have to
use the "printing password" everytime.

I am only giving the "printing password" not the "VBA Password" to other
users.

Thank you.

End Sub

"Dave Peterson" wrote:

There have been posts that suggest that using Sendkeys to go through the menu
system and enter the password, but that's not a robust technique.

I'd never use it in anything that I needed to depend on (or give to others).

Danny wrote:

I'm sorry I did not make myself clear. I know the password because its my own
workbook.

So, can a macro be written for it?

Thanks again.

"JNW" wrote:

I hate to burst your bubble, but you just can't if there is a password on the
file. There is nothing in the code that lets you get around a password. go
into VBA and press F2, select VBIDE for your library and search around for
anything relating to password access. It doesn't exist. The most it will
let you do is see if the file is protected...
--
JNW


"Danny" wrote:

Hi,

I'd like to open my VBA (protected by a password),
delete and replace a module (macro, courtesy of Mr. Chip Pearson's website),
protect the vba project with the same password,
save the file and exit.

When I posted to request the assistance to write a macro for the above
project, I was informed that one CANNOT open and close the VBA project with a
macro.

It's hard to believe that with the sophistication of the program, a macro
command for the above project is not available.

Thank you.





--

Dave Peterson


--

Dave Peterson