Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-reformat of charts after import from Access

Status
Not open for further replies.

Locoman

Technical User
Sep 25, 2002
38
0
0
GB
Hi Folks,

I have an Excel application that I use to draw a whole series of charts from an Access database, and these are updated weekly. This means that the number of rows imported for each query increases by one each week.

Originally I used the wizards to do all the connection stuff, and so the charts' displayed ranges extended automatically. Now I am doing this in VBA I have found that using Excel's "RefreshStyle = xlInsertEntireRows" seems to refresh and extend my data tables correctly, but I would like the chart ranges to "track" automatically as well.

My question: is there an equivalent property setting or similar in VBA that can automatically extend the ranges with each import from Access?

Thanks in advance,

Brian
 



Hi,

Check out faq68-1331

I do not use the Auto Update feature. Rather I macro record the VBA for Editing the Query and run it. Then I use the

ActiveSheet.QueryTables(1).resultrange.CreateNames True, False, False, False
to create a named range for each column.

Then use that range name in the Chart > Source Data - Series Tab...
[tt]
=DetailPartsCadence.xls!POS
[/tt]
where POS is my range name.

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top