Hello guys, i just have a simple code in .xml file that opens a .xls files, selects a specific range, copies it and pastes it as values in the .xml file
The code opens the .xls file but then i recieve a Microsoft "Visual Basic 400" error.
Here is the code
Sub copy_spread_data()
' The following two lines of code and the two last lines speed up the process
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Credit_Score_Workbook = ActiveWorkbook.Name
Workbooks.Open Filename:=Range("XDX2")
Sheets("RATIOS").Select
Range("A1:F100").Select
Selection.Copy
Windows(Credit_Score_Workbook).Activate
Sheets("Spread").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Spreads List").Select
Range("A10").Select
' The following two lines with the two first lines of code
' serve in speeding up the process
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
any suggestions ?
Bookmarks