ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Change color of bar graph w/automation (https://www.excelbanter.com/charts-charting-excel/60113-change-color-bar-graph-w-automation.html)

Dale

Change color of bar graph w/automation
 
Hi
I have several bar graphs called from a within a MsAccess user form. I
would like to change the color of the bars depending on what option is
selected. I can't figure out the correct syntax to do this...thanks in
advance...

Case 6
'Stat InLab to Verified
strsql = "my_query"
Me!Graph0.RowSource = strsql

With objGraph
.HasTitle = True ' Add some titles
.ChartTitle.Text = "STATs: InLab to Verify 90th Percentile (Total
time from InLab)" _
& Chr(10) & "Target 60 min"
.SeriesCollection(1).??????????????? << how do I reference the
series?

Thanks for your help...



Tushar Mehta

Change color of bar graph w/automation
 
My guess is you are using MS Graph for this chart. You should still be
able to use Excel for the below since MS Graph is a subset of XL's
charting capability.

In Excel, turn on the macro recorder (Tools | Macro Record new
macro...), use the UI to change the color of the plotted series, and
turn off the recorder. Switch to the VB Editor and XL *should* give you
the necessary syntax. That syntax *should* work with MS Graph.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article ,
says...
Hi
I have several bar graphs called from a within a MsAccess user form. I
would like to change the color of the bars depending on what option is
selected. I can't figure out the correct syntax to do this...thanks in
advance...

Case 6
'Stat InLab to Verified
strsql = "my_query"
Me!Graph0.RowSource = strsql

With objGraph
.HasTitle = True ' Add some titles
.ChartTitle.Text = "STATs: InLab to Verify 90th Percentile (Total
time from InLab)" _
& Chr(10) & "Target 60 min"
.SeriesCollection(1).??????????????? << how do I reference the
series?

Thanks for your help...




Dale

Change color of bar graph w/automation
 
Thanks Tushar
I should have thought of that...

Dale

"Tushar Mehta" <tm_200310@tushar_hyphen_mehta_dot_see_oh_em wrote in
message om...
My guess is you are using MS Graph for this chart. You should still be
able to use Excel for the below since MS Graph is a subset of XL's
charting capability.

In Excel, turn on the macro recorder (Tools | Macro Record new
macro...), use the UI to change the color of the plotted series, and
turn off the recorder. Switch to the VB Editor and XL *should* give you
the necessary syntax. That syntax *should* work with MS Graph.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article ,
says...
Hi
I have several bar graphs called from a within a MsAccess user form. I
would like to change the color of the bars depending on what option is
selected. I can't figure out the correct syntax to do this...thanks in
advance...

Case 6
'Stat InLab to Verified
strsql = "my_query"
Me!Graph0.RowSource = strsql

With objGraph
.HasTitle = True ' Add some titles
.ChartTitle.Text = "STATs: InLab to Verify 90th Percentile (Total
time from InLab)" _
& Chr(10) & "Target 60 min"
.SeriesCollection(1).??????????????? << how do I reference the
series?

Thanks for your help...







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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com