Sub copyStuff()
Dim sh1 As Worksheet, sh2 As Worksheet, wb As Workbook
Set sh1 = Sheets("DATA") 'Edit sheet name
On Error Resume Next
If Workbooks("timetable.xls") Is Nothing Then
Set wb = Workbook.Open("C\excelfiles\timetable.xls")
End If
On Error GoTo 0
Set sh2 = wb.Sheets(1) 'Edit sheet name
sh2.Range("C1", sh2.Cells(Rows.Count, "H").End(xlUp0)).Copy sh1.Range("C1")
wb.Close False
End Sub
That does not give me much of a clue as to what the problem might be, but try it with the sheet name for the second workbook using the syntax as shown in the code below. If you get an error message, please post the content of the error message and specify the line that was highlighted in the code when you click the debug button. If the code appears to do nothing, then state it that way. Be sure you install the code into the standard code module 1.Its not working i have updated the exact links
Sub copyStuff2()
Dim sh1 As Worksheet, sh2 As Worksheet, wb As Workbook
Set sh1 = Sheets("DATA") 'Edit sheet name
On Error Resume Next
If Workbooks("DC Storm Email Report.xls") Is Nothing Then
Set wb = Workbook.Open("H:Online\Email\Reporting\DC Storm Email Report.xls")
End If
On Error GoTo 0
Set sh2 = wb.Sheets("email_report") 'Edit sheet name
sh2.Range("C1", sh2.Cells(Rows.Count, "H").End(xlUp0)).Copy sh1.Range("C1")
wb.Close False
End Sub
Sub copyStuff3()
Dim sh1 As Worksheet, sh2 As Worksheet, wb As Workbook
Set sh1 = Sheets("DATA") 'Edit sheet name
On Error Resume Next
If Workbooks("DC Storm Email Report.xls") Is Nothing Then
Set wb = Workbook.Open("H:Online\Email\Reporting\DC Storm Email Report.xls")
End If
On Error GoTo 0
Set sh2 = wb.Sheets("email_report") 'Edit sheet name
sh2.Range("C1", sh2.Cells(Rows.Count, "H").End(xlUp)).Copy sh1.Range("C1")
wb.Close False
End Sub