Solved

VBA to open Excel file that contains a password

Posted on 2014-12-03
1
161 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
1 Comment
 
LVL 5

Accepted Solution

by:
Hakan Yılmaz earned 500 total points
Comment Utility
Workbooks.Open Filename:="mybook.xlsx", Password:="mypass"
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now