Chart Color and values in Pivot Table
Hi all..
I'm having a problem here..
I am foing to develop a VBA application here..
And the application will be linked to a workbook which has a pivottable and a pivot chart in it..
The problem is the the pivot chart color seems to be dull..So i changed the default color the the color that i like..
After that i think the color would be nicer if i put some effects...
After i satisfy with the appearance, i choose another query from the pivot table..or in other words i refresh the data with another option...
This time the effects of the chart color is gone..eventhough i save the workbook earlier..besides color, what makes me so tense is if i set the value font alignment to 90 degree and smaller the value font, then it all will be gone after i refresh the chart with other data option...
how to make the setting remains in pivot table??does anyone know??
please!!!
:thumb:
Re: Chart Color and values in Pivot Table
Record a macro of you formatting your chart the way you like it to be.
Then when you refresh your data you can also "refresh" your chart settings.
Re: Chart Color and values in Pivot Table
ok..that seems to be a good suggestion..
but using macro, we have to lauch the shorcut key of the macro to launch the macro right??
is there any other way that we dont have to launch the sortcut key first??
Re: Chart Color and values in Pivot Table
How are you refreshing your data for the chart?
Re: Chart Color and values in Pivot Table
let say the data is based on a combobox that has month data in it.
So if i choose month January, the data refresh to load the January data and of course change the chart that bound to it..
Thats how i refresh the data?Any help?
Re: Chart Color and values in Pivot Table
So it refreshes on the combo box change or click event of a UserForm?
Re: Chart Color and values in Pivot Table
?????
i think on clik..why??can you tell me why??
i'm damn not good in VBA...
Re: Chart Color and values in Pivot Table
I'm just trying to determine where is the best event to run the macro code to format the chart.
You can run macro code by code instead of using a short cut key sequesnce.
If your macro code is Public then you only need
to call the procedure.
Re: Chart Color and values in Pivot Table
Re: Chart Color and values in Pivot Table
Say your macro code is called RefreshChart. You can run it from the combo click event after your chart data gets refreshed.
VB Code:
Private Sub Combo1_Click()
'Refresh chart data.
'...
'...
'Refresh chart formatting.
Call RefreshChart
End Sub
Re: Chart Color and values in Pivot Table
but when i click at the combobox, it doesn't automatically show the coding window like VB. How to know the correct event??
Re: Chart Color and values in Pivot Table
Re: Chart Color and values in Pivot Table
Re: Chart Color and values in Pivot Table
You can just type it in, or record it in the macro to see how to call it in code
Re: Chart Color and values in Pivot Table
i try..but its so confusing...
because the macro doesn't record any event on_clik or something..
it just write the specific coding of what it recorded...
Re: Chart Color and values in Pivot Table
Quote:
Originally Posted by dglienna
You can just type it in, or record it in the macro to see how to call it in code
Yo cant record events of control like the combo box.
The code example in post #10 is the logic you need to use.