Color changing VB Code


Joined
Jun 7, 2019
Messages
2
Reaction score
0
I am trying to get a shape to flip through 4 colors on click when in present mode on powerpoint. I have used this code below, and it works for flipping between 2 colors. I've tried multiple edits/additions and I can't seem to get it to work for 4 different colors. If anyone can help me see what I am not doing correctly I would be most appreciative. Thanks!

Sub FlipColor(oShp As Shape)
If oShp.Fill.ForeColor.RGB = vbBlue Then
oShp.Fill.ForeColor.RGB = vbRed
Else
oShp.Fill.ForeColor.RGB = vbBlue
End If
End Sub
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Excel VB - Copy only the colour format from columns 0
Excel Excel VB help 0
Excel Excel VB Help 0
Excel Need some help with VB in Excel 0
Excel Excel VB - exporting & importing data 0
Access Importing Access Tables using VB / SQL 2

Top