PDA

View Full Version : Solved: Readonly



khalid79m
09-17-2008, 01:20 AM
:devil2:

Private Sub GatherStage1()
Application.DisplayAlerts = False
Application.DisplayStatusBar = True
Application.StatusBar = "Preparing Reports"

Dim i As Integer, wb As Workbook

With Application.FileSearch
.NewSearch
.LookIn = "\\ukhdat\Calling\ (file://ukhdat/Calling/)"
.SearchSubFolders = True
.Filename = "*.xls"
.Application.DisplayAlerts = False
.Execute
For i = 1 To .FoundFiles.Count

Set wb = Workbooks.Open(Filename:=.FoundFiles(i))

Run "GatherStage2"

wb.Close savechanges:=False

Next i
End With
Application.ScreenUpdating = True
Application.StatusBar = False

End Sub


Hi this bit of code works perfectly however I need to go into the file readonly .. can anyone help?

Bob Phillips
09-17-2008, 01:22 AM
Set wb = Workbooks.Open(Filename:=.FoundFiles(i), Readonly:=True)

khalid79m
10-23-2008, 04:29 AM
thanks worked great