Invoke code: No compiled code to run error BC30561: 'DataTable' is ambiguous, imported from the namespaces or types 'Microsoft.Office.Interop.Excel, System.Data'. At line 1

I got this error any suggestions?

Invoke code: No compiled code to run error BC30561: ‘DataTable’ is ambiguous, imported from the namespaces or types ‘Microsoft.Office.Interop.Excel, System.Data’. At line 1

the line : Dim PivotTable As DataTable = New DataTable()

@kalmajhad

Try using System.Data.Datatable instead of only Datatable

This should solve the issue

cheers

Yes, it is. Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.