justforgroups
New Member
- Joined
- Mar 10, 2010
- Messages
- 26
Hi,
Can anyone tell me why ActiveSheet.PivotTableWizard asks for a DSN connection?
Can anyone tell me why ActiveSheet.PivotTableWizard asks for a DSN connection?
Code:
ConnectString = "ODBC; Driver={Microsoft Text Driver (*.txt; *.csv)}; Dbq=" & gs_path & "; Extensions=asc,csv,tab,txt; UID=admin;"
QArray = Array(ConnectString, "Select * From " & lv_src)
ActiveSheet.PivotTableWizard SourceType:=xlExternal, SourceData:= _
QArray, TableDestination:=Worksheets(lv_pivot).Cells(1, 1), _
TableName:="PivotTable1"