VBA Open, Update Links, Password to Modify

LEVICC01

New Member
Joined
Aug 27, 2010
Messages
42
Hi guys,

Any ideas why this doesnt work. I've used before, but ive added in UpdateLinks, which has stopped it. But it works if i dont have the password bit, so not sure why the combination is failing.

Workbooks.Open ("filepath.xls"), UpdateLinks:=False, , , "Password"
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Is that a writereservepassword? If so, it's in the worng place (sequence). I would use a NamedArgument (as you have for UpdateLinks then you can do without the extra commas:

Workbooks.Open "filepath.xls", UpdateLinks:=False,WriteReservePassword:="Password"
 
Upvote 0
Hi,

Not sure what one of those is to be honest.
I have tried it and get the following error:
Names argument not found.

I saved it with a password to modify.
I'm using another file to launch all my reports, and i want the code to open it and type the password in for me
 
Upvote 0
That would be because I got the named argument wrong! Should have been:

Rich (BB code):
Workbooks.Open "filepath.xls", UpdateLinks:=False,WriteResPassword:="Password"
 
Upvote 0
Hi,

it says the password is incorrect, but it isnt? Would this be referring to a different password tot he Modify one?
 
Upvote 0
What exact code are you using? Is it a password to open that you are using rather than a writerespassword? What happens when you open the workbook directly in Excel - what messages do you see and what do you type in in response?
 
Upvote 0
If i open i get a Password box come up:

Says that is is reserved by me, Enter password for Write Access, or open Read only.

There is a box for the password and 3 buttons:
Read Only OK Cancel
 
Upvote 0
Hi,
If i use that bit, it works fine but not now i put a password on it. Same as if i opened from the file location manually, i get the password box.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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