Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Open with VBA - hide passwords in code?

hi

i have a piece of code where i need to open various workbooks - these
all have passwords (i know what they are).

what i dont want to do is code in the passwords into my vba as anyone
could look at them and see exactly what they are.

is there a way i can encrypt the passwords in the code?

i dont really want to password protect them as i have a tendancy to
forget them
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open with VBA - hide passwords in code?

There is no built in support for it. You could write your own routine to do
it (decrypt the password), but someone could read your code and try to
understand the algorithm. Not sure they would actually bother, however.

workbooks.Open Filename:="ABC.xls", Password:=MyDecryptFunction("RSM13V")
--
Regards,
Tom Ogilvy

"Buffyslay" wrote in message
m...
hi

i have a piece of code where i need to open various workbooks - these
all have passwords (i know what they are).

what i dont want to do is code in the passwords into my vba as anyone
could look at them and see exactly what they are.

is there a way i can encrypt the passwords in the code?

i dont really want to password protect them as i have a tendancy to
forget them



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
how to open and remove passwords in bulk gordon Excel Discussion (Misc queries) 4 August 10th 07 04:46 PM
pre-authorized to open a file without passwords? CCrew2000 Excel Discussion (Misc queries) 1 May 23rd 07 11:42 PM
2 separate passwords (both valid) to open file regi Excel Discussion (Misc queries) 3 October 2nd 06 04:55 PM
Excel passwords are changing when two workbooks are open. Password Excel Worksheet Functions 0 December 21st 05 04:31 PM
Setting VBA passwords from within code [email protected] Excel Programming 1 January 17th 04 06:53 PM


All times are GMT +1. The time now is 01:23 AM.

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

About Us

"It's about Microsoft Excel"