Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Checking HasPassword property without opening

Looping through a FileSearch.FoundFiles object's collection, I have all the
filenames in a given directory. If the file has a password, I'd like to
change it to a new value. Can I do this without opening the file?

' pseudocode
Dim fs as FileSearch
If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
Open
.Password = strNew
.Save
.Close
End If

Can anyone help?
Sprinks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Checking HasPassword property without opening

I don't think so.


Sprinks wrote:

Looping through a FileSearch.FoundFiles object's collection, I have all the
filenames in a given directory. If the file has a password, I'd like to
change it to a new value. Can I do this without opening the file?

' pseudocode
Dim fs as FileSearch
If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
Open
.Password = strNew
.Save
.Close
End If

Can anyone help?
Sprinks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Checking HasPassword property without opening

Thanks, Dave.

Sprinks

"Dave Peterson" wrote:

I don't think so.


Sprinks wrote:

Looping through a FileSearch.FoundFiles object's collection, I have all the
filenames in a given directory. If the file has a password, I'd like to
change it to a new value. Can I do this without opening the file?

' pseudocode
Dim fs as FileSearch
If (the workbook corresponding to fs.FoundFiles(i)).HasPassword Then
Open
.Password = strNew
.Save
.Close
End If

Can anyone help?
Sprinks


--

Dave Peterson

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
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Checking range of cells for entry then checking for total Barb Reinhardt Excel Programming 1 October 13th 06 02:47 PM
Checking before opening "activate:newwindow" to see if already opened sam s via OfficeKB.com Excel Programming 2 September 20th 05 02:37 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM


All times are GMT +1. The time now is 08:51 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"