ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Visual Basic Macro(VBA) for a password protected file? (https://www.excelbanter.com/excel-programming/336539-visual-basic-macro-vba-password-protected-file.html)

eroszzz

Visual Basic Macro(VBA) for a password protected file?
 

How do I create a Visual Basic Macro(VBA) for a password protected file
I essentially want the VBA to open the file, update the links and sav
it. But when I run the VBA, it forces me to type in the password fo
my file. Since the VBA is going to open about 20 files, if I have t
type the password in every time, it defeats the purpose of the VBA.
Can anyone please help me? Thank you so very much

--
eroszz
-----------------------------------------------------------------------
eroszzz's Profile: http://www.excelforum.com/member.php...nfo&userid=846
View this thread: http://www.excelforum.com/showthread.php?threadid=39340


Tom Ogilvy

Visual Basic Macro(VBA) for a password protected file?
 
The workbook.Open method has an argument for password. Use that to specify
the password.

--
Regards,
Tom Ogilvy


"eroszzz" wrote in
message ...

How do I create a Visual Basic Macro(VBA) for a password protected file?
I essentially want the VBA to open the file, update the links and save
it. But when I run the VBA, it forces me to type in the password for
my file. Since the VBA is going to open about 20 files, if I have to
type the password in every time, it defeats the purpose of the VBA.
Can anyone please help me? Thank you so very much.


--
eroszzz
------------------------------------------------------------------------
eroszzz's Profile:

http://www.excelforum.com/member.php...fo&userid=8464
View this thread: http://www.excelforum.com/showthread...hreadid=393406





All times are GMT +1. The time now is 09:44 PM.

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