Password in VBA

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
 
S

Stephan Kassanke

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
 
Top