?
Solved

VBA to open Excel file that contains a password

Posted on 2014-12-03
1
Medium Priority
?
172 Views
Last Modified: 2014-12-03
Can an Expert provide me with VBA code that will enable the Macro to open the file that contains a password.

Lets say the password is Holiday1 and it will always be that.

When I open the file I get the window up that asks me for the password. Instead of the User entering the password can the VBA code insert the password to open the file?

Thanks
0
Comment
Question by:Jagwarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Hakan Yılmaz earned 2000 total points
ID: 40478252
Workbooks.Open Filename:="mybook.xlsx", Password:="mypass"
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question