Results 1 to 16 of 16

Thread: Chart Color and values in Pivot Table

  1. #1

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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!!!
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  3. #3

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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??
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  5. #5

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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?
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  7. #7

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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...
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  9. #9

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    Re: Chart Color and values in Pivot Table

    how is that?
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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:
    1. Private Sub Combo1_Click()
    2.     'Refresh chart data.
    3.     '...
    4.     '...
    5.     'Refresh chart formatting.
    6.     Call RefreshChart
    7. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  11. #11

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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??
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  12. #12

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    Re: Chart Color and values in Pivot Table

    Hello????????????
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  13. #13

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    Re: Chart Color and values in Pivot Table

    Does anyone know???
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  14. #14
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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

  15. #15

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    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...
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  16. #16
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width