Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 pivot tables in an EXCEL workbook that are linked to tables located
on a SQL Server. The end user will be responsible for refreshing these tables by clicking a button. Right now a dialog box appears and requires the user to enter an id and password for each table. I want to have the pivot tables refresh on open without prompting for a password. Is this possible. I have started to write the following code but I don't know if I am on the right track. Sub Refresh_Data() 'Set up the connection string, reference an ODBC connection connstring = _ "ODBC;DSN=Gulf States SQL Server;UID=e45768;PWD=e45768;Database=DataMart" 'Refresh Pivot Tables Worksheets("PvtTbls").PivotTables("PivotTable1").P ivotCache.Refresh Worksheets("PvtTbls").PivotTables("PivotTable2").P ivotCache.Refresh End Sub I am a programming novice and not sure how to make this work. Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Refreshing Pivot Tables | Excel Discussion (Misc queries) | |||
When refreshing pivot tables my pivot table chart type changes | Excel Discussion (Misc queries) | |||
Refreshing Pivot Tables | Excel Worksheet Functions | |||
Refreshing Pivot Tables QUery | Excel Programming | |||
Pivot Tables - Refreshing with data??..... | Excel Programming |