Password in VBA

  • Thread starter Thread starter Victor H
  • Start date Start date
V

Victor H

I wrote a macro that opens a worksheet that is password
protected.

Is there a way that I could I have the macro input the
password by itself at the time the worksheet beeing called
needs it? ( I mean without my intervention).

I would probably have to password-protect the macro itself
so that nobody would be able to see it in the code.

If this all possible, I would gratefully appreciate an
example.

Thanxx
 
Victor H said:
I wrote a macro that opens a worksheet that is password
protected.

Is there a way that I could I have the macro input the
password by itself at the time the worksheet beeing called
needs it? ( I mean without my intervention).

I would probably have to password-protect the macro itself
so that nobody would be able to see it in the code.

If this all possible, I would gratefully appreciate an
example.

Thanxx

Hi Victor,

your macro probably opens a workbook instead of a worksheet. The
workbooks.open method has a parameter "password" which is applied when
opening the workbook.

cheers,
Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top