Forum

Password Log - To o...
 
Notifications
Clear all

Password Log - To open other excel password protected documents

2 Posts
2 Users
0 Reactions
76 Views
(@planflierbh)
Posts: 1
New Member
Topic starter
 

Hi 

Is it possible to create a VBA code that can open other Excel documents without me typing in the password every time? 

Name of documents and password examples

Planner - password1

Tracker - Password2

 

Hope you can help

 
Posted : 12/09/2020 4:53 pm
(@purfleet)
Posts: 412
Reputable Member
 

yes quite straight forward

Sub OpenWBwithPW()

Dim p As String
Dim f As String

p = "F:Moth"
f = "TestOpenPW.xlsx"

Workbooks.Open (p & f), Password:="bananas"

End Sub

 
Posted : 12/09/2020 11:13 pm
Share: