We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub Workbook_Open() Application.DisplayAlerts = False On Error Resume Next Dim basebook As Workbook Dim mybook As Workbook Dim pt As PivotTable Dim ws As Worksheet With Application.FileSearch **** here is the problem .NewSearch .LookIn = "C:\Consultas\" .SearchSubFolders = True .FileType = msoFileTypeExcelWorkbooks If .Execute() > 0 Then For i = 1 To .FoundFiles.Count Set mybook = Workbooks.Open(.FoundFiles(i), UpdateLinks:=0, IgnoreReadOnlyRecommended:=True, corruptload:=0) For Each ws In ActiveWorkbook.Worksheets For Each pt In ws.PivotTables pt.PivotCache.MissingItemsLimit = xlMissingItemsNone Next pt Next ws ActiveWorkbook.RefreshAll ActiveWorkbook.Save ActiveWorkbook.Close Next i End If End With Application.Quit End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.