LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default ListObjects.Add Question

I am building a workbook to automate reporrt generation for data in Access. I
have 40+ locations that I have to generate reports for, so I am creating
worksheets for each site, and quereying Access for the specific data.

What I would like to do, is on the worksheet for each site, have the data
that I need for that site and the specific charts that I need to generate.

I am using ListObjects.Add to add a QueryTable object to the worksheet. It
query's the access db and gets the data that I need. This part works fine. It
gets the data, and creates an xl table on the sheet.

My question, is how do I make changes to that query. Let's say that the user
wants to change the dates for the data being charted. How do I change that
query and bring the new data back into the existing xl table (so that the
chart updates itself)?

I haven't been able to figure out how to do that. I need to make sure that I
can change the query, re-run it and put the data into the previously defined
xl table. From what I can tell, the QueryTable object will not put the data
into a previously defined table.

Any guidance or pointers are greatly appreciated.

Steve
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
listobject or listobjects sample code Satyam Reddy Excel Programming 0 April 14th 08 03:38 PM
If ActiveSheet.ListObjects = True ... Not Working ryguy7272 Excel Programming 2 April 2nd 08 08:14 PM
ListObjects.Add error doug Excel Programming 0 July 6th 06 03:41 PM
listobjects and querytables S. Parker Excel Programming 0 November 14th 05 09:08 AM


All times are GMT +1. The time now is 12:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"