Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lorenzo Lee   on Aug 24 In MS Office Category.

  
Question Answered By: Vid Fischer   on Aug 24

Sorry...my .execute is in an IF statement...it doesn't find my file
until it tries to create a new one and then tries to save over the
existing file...



With fsoFileSearch



.NewSearch

.LookIn = myDir

.Filename = wbName

.SearchSubFolders = True

.MatchTextExactly = True

.FileType = msoFileTypeExcelWorkbooks



If .Execute() > 0 Then



Workbooks.Open Filename:=myDir & "\" & wbName,
Password:="xxxxxxx"



And the end with is on down.

Share: