Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Automatically enter Password in Macro

Hello. I'd like to set up a Macro that automatically opens a Password
protected workbook by having the password in the VBA string. I
thought that the below code would work, but I am prompted for the
password.

Workbooks.Open Filename:="Jan-2004.xls", Password:="password"

How can I set this up so that I'm not prompted for anything. (I'd like
to simply have these run through a scheduler rather than opening each
one just to enter the combination of keys.

Any help is appreciated.

Thank You

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Automatically enter Password in Macro

You need to specify the password parameter using password:= "string"
(that's colon = )

Workbooks.Open Filename:="Jan-2004.xls", Password:="password"

It worked for me?

Cheers
N

"Pepe" wrote in message
om...
Hello. I'd like to set up a Macro that automatically opens a Password
protected workbook by having the password in the VBA string. I
thought that the below code would work, but I am prompted for the
password.

Workbooks.Open Filename:="Jan-2004.xls", Password:="password"

How can I set this up so that I'm not prompted for anything. (I'd like
to simply have these run through a scheduler rather than opening each
one just to enter the combination of keys.

Any help is appreciated.

Thank You

Paul





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
enter data in cell then run macro automatically R D S Excel Discussion (Misc queries) 2 January 25th 05 10:19 PM
protect sheet macro - can't have it enter password inaz Excel Programming 4 January 14th 04 04:52 AM
How to use macro to enter password? Ankan[_4_] Excel Programming 1 December 23rd 03 12:12 AM
Macro to go a WEB site and enter a password Bob Benjamin Excel Programming 7 November 14th 03 03:34 PM
one line macro to enter password for workbook N Lenox Excel Programming 5 October 29th 03 08:36 PM


All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"