Our code (I copied it and tweaked it from another vba forum) goes out to @ 200 files in a folder and copies a single row into 1 sheet -
works great
But Rather than putting in code to tell it to Don't UpdateLinks or Don't Ask and then getting a second prompt, is there code to tell it to Don't Update after it asks? just assume continue for each file?? so there are no prompts?
I don't want to click on continue for 200 files
the Asktoupdatelinks=false --- still prompts a continue
isent there a updatelinks=0 ?? where would I put it?
_Here is the code so far_______________________________
Sub LoopThroughFolder()
Dim oFSO As Object, sPath As String, wb As Workbook
Set oFSO = CreateObject("Scripting.FileSystemObject")
sPath = Environ("userprofile") & "\Desktop\Testing" 'path
For Each oFile In oFSO.GetFolder(sPath).Files
Set wb = Workbooks.Open(oFile)
Application.AskToUpdateLinks = False
wb.Sheets("Summary").Range("B9:K9").Copy
ThisWorkbook.Sheets("Summary").Range("A" & Rows.Count).End(xlUp)(2).PasteSpecial xlValues
wb.Close False
Next oFile
End Sub
Thank you
works great
But Rather than putting in code to tell it to Don't UpdateLinks or Don't Ask and then getting a second prompt, is there code to tell it to Don't Update after it asks? just assume continue for each file?? so there are no prompts?
I don't want to click on continue for 200 files
the Asktoupdatelinks=false --- still prompts a continue
isent there a updatelinks=0 ?? where would I put it?
_Here is the code so far_______________________________
Sub LoopThroughFolder()
Dim oFSO As Object, sPath As String, wb As Workbook
Set oFSO = CreateObject("Scripting.FileSystemObject")
sPath = Environ("userprofile") & "\Desktop\Testing" 'path
For Each oFile In oFSO.GetFolder(sPath).Files
Set wb = Workbooks.Open(oFile)
Application.AskToUpdateLinks = False
wb.Sheets("Summary").Range("B9:K9").Copy
ThisWorkbook.Sheets("Summary").Range("A" & Rows.Count).End(xlUp)(2).PasteSpecial xlValues
wb.Close False
Next oFile
End Sub
Thank you