Adding a Different Look To Your Interactive Dashboard

Code for Interactive Dashboard Course

This code Changes the Background in 4 different colors

  • Switch to the Visual Basic ALT + F11
  • Insert a Module ALT >I>M
  • Copy and Paste the codes here below then Close the VBE
  • Create 4 shapes, format them & right-click and Assign Macros
  • Test the functionality and save the file as .XLSM

Sub BlueBackground()

Range(“A1:Az120”).Interior.Color = RGB(0, 46, 138)

Range(“J2,Q2,J17,Q17”).Interior.Color = vbWhite

Range(“E17,L17,S17”).Font.Color = vbWhite

Range(“A1”).Select

End Sub

Sub RedBackground()

Range(“A1:Az120”).Interior.Color = RGB(116, 0, 0)

Range(“J2,Q2,J17,Q17”).Interior.Color = vbWhite

Range(“E17,L17,S17”).Font.Color = vbWhite

Range(“A1”).Select

End Sub

Sub GreyBackground()

Range(“A1:Az120”).Interior.Color = RGB(217, 217, 217)

Range(“J2,Q2,J17,Q17”).Interior.Color = vbWhite

Range(“E17,L17,S17”).Font.Color = vbBlack

Range(“A1”).Select

End Sub

Sub WhiteBackground()

Range(“A1:Az120”).Interior.Color = vbWhite

Range(“J2,Q2,J17,Q17”).Interior.Color = RGB(217, 217, 217)

Range(“E17,L17,S17”).Font.Color = vbBlack

Range(“A1”).Select

End Sub

On the View Tab: Uncheck the Gridlines, Formula Bar, Headings

Drag the Horizontal Scroll Bar to cover all sheets

Share This Post
Have your say!
2 0

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

SUBSCRIBE TO OUR EMAILING LIST AND RECEIVE FREE BOOK

Receive my Amazing Textbook “Pivot Tables From Zero To Hero” Totally FREE when you subscribe below to our emailing list.
SUBSCRIBE NOW
close-link