I don't know what is the problem with my code.
Scenario:
I've use a code that will trigger the table
'table header date changer
Sub dateTable()
Dim shtNme As Variant
Dim tables As ListObject
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
shtNme = CStr(ws.Name)
Select Case shtNme
Case CStr(Sheet1.Name)
Case CStr(Sheet2.Name)
Case CStr(Sheet3.Name)
Case CStr(Sheet12.Name)
Case CStr(Sheet41.Name)
Case Else
For Each tables In ws.ListObjects
tables.ShowHeaders = True
tables.Range(1).Resize(, 49).Value = Sheet2.Cells(2, 1).Resize(, 49).Value
tables.ShowHeaders = False
ws.Cells(2).EntireRow.Delete
Next tables
End Select
Next ws
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
After I've use this code(above) and use another macro (like copy/paste - import new value on each table referring to the header) - the process is very slow. And I don't know why?
Do I need to change my code? or REFRESH the table?
P.S: If I don't use the code above - the process is fast but I cannot change the date. If I change the date the process is slow.
Bookmarks