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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel newbie - series titles and axis format

Status
Not open for further replies.

BusMgr

IS-IT--Management
Aug 21, 2001
138
US
I am creating a chart in excel to plot data from an access database. The chart opens and plots fines, then closes excel. Currently all my code is being run from the Access database.

My first problem is that I need to format the series title for the chart. I do it, but it is not saved with the chart. I can create the macro to do it, but it does no run automatically when the chart is created or activated.

Private Sub Chart_Activate()
ActiveSheet.ChartObjects("Sheet3").Activate
ActiveSheet.Legend.Select
ActiveChart.SeriesCollection(1).Name = "=""Test Data A"""
End Sub

The second problem that I am having is with the x-axis formatting. The axis data is in date and time. I create a spreadsheet with Date, Time, Test Data as the column headers. Somedays I may have one test point, some days I have multiple. The x-axis is unreadable as it puts the date and time for each point into the axis title. Is there some way to modify the titles so that all the times are shown, but only one date for each date. I've tried to manually set this, again with no success.

Thanks in advance.

BusMgr.
 
Hi,

Why are you creating a chart each time? I'd set up a query for Excel to Access to retrieve the data. The chart need be only set up ONCE!

Regarding the x-axis, make it Time Scale and then select the axis and format the time as you like.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top