I have the following code
Sub CopyMacro()
'
' CopyData Macro
'
Dim tableName As ListObject
Set tableName = Worksheets("ToCopySheet").ListObjects(1)
ListObjects("Table1").ListColumns("TaskUID").DataBodyRange.Copy tableName.ListColumns("TaskUID").DataBodyRange
End Sub
When I try to run this I get a compile error. Sub or Function not defined. I do not understand the issue here as I don't see anything wrong in this syntax.
The thing I'm trying to accomplish is to copy one column from one table to another table column in another sheet (ToCopySheet).
Could someone please help resolve this error