Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,074
- Office Version
- 2019
- Platform
- Windows
I'm trying to reference a table in my worksheet (which works fine by name), however, since I will be duplicating the sheet, the table name will change. I tried to reference the table by index number , but it fails. how do I reference my table by index number. The table index number is 2
to
VBA Code:
With OHLCChart.Chart
.SetSourceData Source:=Range("tblChartData3")
...
...
End With
to
VBA Code:
With OHLCChart.Chart
.SetSourceData Source:=ActiveSheet.ListObjects(2)
...
...
End with