Disabled Password Prompt Failed !!!

Kingnight

New Member
Joined
Feb 5, 2011
Messages
38
Hey,

Thanks a lot for your time. I have one problem I cannot fix. Actually when I use VBA to automatically open protected excel sheet (2007 version with extension like .XLSX), i used the following code:

Workbooks.Open Filename:=xxx, UpdateLinks:=0, password:=0

It does not work!!! It works fine for openning all the 2003 Excel version. It does not work for 2007 versions.

I am using excel 2003 version.

Please help me figure out how to do that. :confused::confused:
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Is it the workbook that's saved with a password or is it the worksheet that's protected? Your code is trying to open the workbook with a password.

Is the workbook password actually a zero or are you trying to say that it doesn't have a password?

In what way does it not work? Is there an error message? (Make sure you've disabled any On Error directives!)
 
Upvote 0
Very sorry for not explaining very clearly about the situation:

1 I created survey in 2003 version with password protection to change ( it will forbid people to change anything except some cells in the sheets). Not password protection for workbook (TOOLS/OPTIONS/Password to open)

2 But when people send back those surveys, some of them will covert that into 2007 versions (.XLSX)

3 So I open those 2007 version surveys (.XLSX), every time password prompt will appear before I can view anything. (actually I could give any password. The system will accept it)

4 I created macro to disabled that

Workbooks.Open Filename:=xxx, UpdateLinks:=0, password:="0"

It does not work. Please let me know if it is clear. I really appreciate it.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

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