1
Hello, could someone provide me an example of using the appropriate parameter connection
of the method PivotTableWizard()
?
When I use this parameter I get the error: Unable to obtain the Pivottablewizard property of the Worksheet class. Here’s the code:
Dim wb, excel As Object
wb = GetWorkbook(handle, workbook)
excel = wb.Application
Dim ws as Object = GetWorksheet(handle,workbook,worksheetname)
Dim objTable As PivotTable
objTable = ws.PivotTableWizard(,,,,,,,,,,,,,,,"ODBC;Provider=MSDASQL.1;Persist Security Info=False;Data Source=SQLexpress;Initial Catalog=PivotChart")
Shouldn’t you declare the other parameters? https://msdn.microsoft.com/pt-br/vba/excel-vba/articles/worksheet-pivottablewizard-method-excel
– Leandro Angelo