Нужно скопировать значения без формулы, которая в настоящее время вызывает ошибку - работаю над ней всю ночь и не могу это сделать
Sub LoopThrough()
Dim MyFile As String, Str As String, Mydir As String, Wb As Workbook
Dim Rws As Long, Rng As Range
Set Wb = ThisWorkbook
'change address to suite
Mydir = "C:"
MyFile = Dir(Mydir & "*.xlsm")
ChDir Mydir
Application.ScreenUpdating = 0
Application.DisplayAlerts = 0
Do While MyFile <> ""
Workbooks.Open (MyFile)
With Worksheets("IDS_BCS")
Rws = .Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(.Cells(2, 1), .Cells(Rws, 7)) 'Column a to column G
Rng.Copy Wb.Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
ActiveWorkbook.Close True
End With
MyFile = Dir()
Loop
End Sub
Большое спасибо за ваша помощь