|
-
May 3rd, 2005, 11:20 PM
#1
Thread Starter
Hyperactive Member
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!!!
-
May 3rd, 2005, 11:23 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2005, 11:34 PM
#3
Thread Starter
Hyperactive Member
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??
-
May 3rd, 2005, 11:40 PM
#4
Re: Chart Color and values in Pivot Table
How are you refreshing your data for the chart?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2005, 11:42 PM
#5
Thread Starter
Hyperactive Member
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?
-
May 3rd, 2005, 11:44 PM
#6
Re: Chart Color and values in Pivot Table
So it refreshes on the combo box change or click event of a UserForm?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2005, 11:48 PM
#7
Thread Starter
Hyperactive Member
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...
-
May 4th, 2005, 12:11 AM
#8
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 4th, 2005, 12:12 AM
#9
Thread Starter
Hyperactive Member
Re: Chart Color and values in Pivot Table
-
May 4th, 2005, 12:14 AM
#10
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 4th, 2005, 12:56 AM
#11
Thread Starter
Hyperactive Member
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??
-
May 4th, 2005, 01:59 AM
#12
Thread Starter
Hyperactive Member
Re: Chart Color and values in Pivot Table
-
May 4th, 2005, 05:13 AM
#13
Thread Starter
Hyperactive Member
Re: Chart Color and values in Pivot Table
-
May 6th, 2005, 12:50 AM
#14
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
-
May 6th, 2005, 02:01 AM
#15
Thread Starter
Hyperactive Member
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...
-
May 6th, 2005, 11:00 AM
#16
Re: Chart Color and values in Pivot Table
 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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|