ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open workbook that is protected with password (https://www.excelbanter.com/excel-programming/300033-open-workbook-protected-password.html)

ianripping[_67_]

Open workbook that is protected with password
 
Hi I have a workbook that is saved with a password.

I want to create a macro that will opne up this file because it know
the password, eg:

Dim password
password = "letmein"
Dim path
Dim filename
Workbook.open = path & filename 'With password!

Can anyone help with this

--
Message posted from http://www.ExcelForum.com


ianripping[_68_]

Open workbook that is protected with password
 
Sorry about this, ive worked it out. Cancel pos

--
Message posted from http://www.ExcelForum.com


Chip Pearson

Open workbook that is protected with password
 
Ian,

You can include the password in the Open method. E.g.,

Workbooks.Open Filename:=Path & Filename, Password:=Password


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"ianripping " wrote
in message ...
Hi I have a workbook that is saved with a password.

I want to create a macro that will opne up this file because it

knows
the password, eg:

Dim password
password = "letmein"
Dim path
Dim filename
Workbook.open = path & filename 'With password!

Can anyone help with this?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com