excel2003 pasword on open

nodari

Board Regular
Joined
Jan 8, 2010
Messages
224
I have done excel workbook that it always asks passwor to anyone on open, using

Private Sub workbook_Open()

that's OK,

but I need not open this workbook from VBA without password.

how can I organize, can you advice somthing?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
If you know the password why can't you use it in the code when you want to open the workbook?
 
Upvote 0
What userform?

Are you entering the password on a userform and clicking a button to open the workbook?

Or something like this.

If you are it's pretty straightforward to get the password if it's been entered in a textbox or similar.

It would just be something like this, where TextBox1 is where the password has been entered.
Code:
strPass = TextBox1.Value
Note - the userform would still need to be loaded for that to work.
 
Upvote 0
What userform?

Are you entering the password on a userform and clicking a button to open the workbook?

Or something like this.

If you are it's pretty straightforward to get the password if it's been entered in a textbox or similar.

It would just be something like this, where TextBox1 is where the password has been entered.
Code:
strPass = TextBox1.Value
Note - the userform would still need to be loaded for that to work.

I think I have said not understadable.

I need all users opening this worksheet, needs to enter the password into textBox.

and when my VBA opens this workbook, it mustn't ask for a password (mustn't wait for click).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top