I have bunch of excel files (approximately 1000 files ) which I want to merge them together and delete duplicate rows of them. I have the following excel vba macro to do this.

Sub simpleXlsMerger()
Dim bookList As Workbook
Dim counter As Integer
counter = 1
Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
Application.ScreenUpdating = False
Set mergeObj = CreateObject("Scripting.FileSystemObject")

'change folder path of excel files here
Set dirObj = mergeObj.Getfolder("C:\Users\dalakada\Desktop\deneme google drive keywords 100 tane")
Set filesObj = dirObj.Files
For Each everyObj In filesObj
Set bookList = Workbooks.Open(everyObj)

'change "A2" with cell reference of start point for every files here
'for example "B3:IV" to merge all files start from columns B and rows 3
'If you're files using more than IV column, change it to the latest column
'Also change "A" column on "A65536" to the same column as start point
Range("A2:N" & Range("A1000000").End(xlUp).Row).Copy
ThisWorkbook.Worksheets(1).Activate

'Do not change the following column. It's not the same column as above
Range("A1000000").End(xlUp).Offset(1, 0).PasteSpecial
If counter Mod 90 = 0 Then
    Call RemoveDuplicatesCells_EntireRow
End If


Application.CutCopyMode = False
bookList.Close
counter = counter + 1
Next
End Sub
With this sub, I just basically open each files in a specified folder and merge them into one excel file. Everything works here.

Sub RemoveDuplicatesCells_EntireRow()
'PURPOSE: Remove the entire row of duplicate cell values within a selected cell range
'SOURCE: www.TheSpreadsheetGuru.com

Dim rng As Range
Dim x As Integer

'Optimize code execution speed
  Application.ScreenUpdating = False

'Determine range to look at from user's selection
  On Error GoTo InvalidSelection
    Set rng = Range("B2:B1000000")
  On Error GoTo 0

'Ask user which column to look at when analyzing duplicates
  On Error GoTo InputCancel
    x = InputBox("Which column should I look at? (Number only!)", _
      "Select A Column", 1)
  On Error GoTo 0

'Optimize code execution speed
  Application.Calculation = xlCalculationManual

'Remove entire row if duplicate is found
  rng.EntireRow.RemoveDuplicates Columns:=x

'Change calculation setting to Automatic
  Application.Calculation = xlCalculationAutomatic

Exit Sub

'ERROR HANDLING
InvalidSelection:
  MsgBox "You selection is not valid", vbInformation
  Exit Sub

InputCancel:

End Sub
This is the removing duplicate rows sub. This code works also independently. The problem is If I use this code combined with simpleXlsMerger code that I wrote. It does not work. And It gave me blank space worksheet. What are your thoughts ? Thank you so much.