Custom Colors in Power point using VBA User Form RRS feed

  • Question

  • Hello everyone,

    I am very new to VBA coding and as part of my job profile, I have been trying to create a code which allows user to open a userform and fill in the RGB values for custom colours in the existing theme.

    I found a solution online created by Shyam Pillai called Custom Color Swatch, now although it does exactly what I am looking for, but

    • it creates only 12 custom colors (I need an option where users can create as many as the like -  I believe the maximum rows of custom colours is 6) 
    • This particular add-in is an .exe file, where I need to create a VBA userform within the template, without the need to install a separate application (due to IT restrictions)

    Can someone please help me with this? I have tried looking everywhere and can't figure out any solution myself.

    Any help will be really appreciated.

    Best regards.

    Thursday, January 29, 2015 2:25 PM


  • Hi genXguy,

    For custom color, I suggest that you could add three scrollbar and label (or other) tools to the UserForm, then in the change event get these scrollbars’ value and change label’s background color. Add a button to the UserForm, in the click event get these scrollbars’ value and base on these value to change slide color.

    To change the slide color, please refer to this code below:

    Dim s As PowerPoint.Slide
    Set s = Application.ActivePresentation.Slides(1)
    s.FollowMasterBackground = msoFalse
    s.Background.Fill.ForeColor.RGB = RGB(100, 0, 0)



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 30, 2015 7:37 AM