I've recently upgraded to excel 2013, and some VBA code (below) which worked fine in Excel 2007 now seems to return errors:

Sub Sheet_Names()
Dim i As Long, qt As QueryTable
For i = 2 To 201
With Sheets(i)
.Name = Sheets(1).Range("C" & i).Value 
.Range("H1").Value = Sheets(1).Range("C" & i).Value 
For Each qt In .QueryTables
On Error Resume Next
qt.Refresh BackgroundQuery:=False
On Error GoTo 0
Next qt
End With
Next i
End Sub
The specific error it returns is "run-time error '1004'", and I've been able to debug the error to the line of code ".Name = Sheets(1).Range("C" & i).Value"

Background:

I currently have a master sheet (Sheet 1) containing about 200 codes (C2:C201), with 200 individual sheets (sheet 2, sheet 3,..., sheet 201) in the workbook I want to be renamed, edited individually, and have their separate web queries updated in each sheet.

The purpose of the code is to have VBA rename sheet2 from the list (it would be from c2, "AAA"), then within sheet2 (now renamed AAA) I would like the new name of the sheet to be entered in cell H1. I have web queries in each of the sheets synced up so that when H1 is changed, they automatically update from the web, so the vba pauses until all the query updates within a given sheet are finished, and once the sheet has updated, move on and do the same thing for sheet3, sheet4, sheet5, etc. pausing each time to let each sheet update from their individual web queries after their names have been changed.

Any help is very much appreciated, even if it is just some advice on perhaps why the error is now occurring, or why it occurs on that specific line.

Thanks