PC Review


Reply
Thread Tools Rate Thread

Code Problem

 
 
Drew
Guest
Posts: n/a
 
      28th Oct 2009
I am trying to click on a command button in a worksheet that will refresh
pivot tables and ODBC connections throughout my workbook. The code seems to
work well to refresh the pivot tables, but once it hits the ODBC data it
errors out.

Can someone help me with my code?

Sheets("Sheet1").PivotTables("PivotTable1").RefreshTable
Sheets("Sheet2").PivotTables("PivotTable1").RefreshTable
Sheets("Sheet3").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("Sheet4").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
--
Drew
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with code (error code 9) Vince Microsoft Excel Programming 3 12th Oct 2009 04:16 PM
VBA problem w Layout Reset. Manually stepped code gives good result. Run code doesn't work! Bob Microsoft Powerpoint 3 6th Nov 2008 09:17 PM
HREF ASP code problem - what's wrong with this code.... =?Utf-8?B?TWljaw==?= Microsoft Frontpage 3 14th Nov 2005 01:53 PM
Problem getting cookie from code-behind (worked in code-beside) Alan Silver Microsoft ASP .NET 1 15th Sep 2005 06:23 PM
[New] Zipoid - ZIP Code, City Name and Area Code Lookup - Zip Code to Zip Code Distance Calculation Mel Freeware 0 22nd Jul 2005 04:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:18 AM.