Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-26-2016, 09:30 AM
JohnWilson JohnWilson is offline VBA: How to change color of a CommandButton Windows 7 64bit VBA: How to change color of a CommandButton Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Command Buttons are not Shapes and in this case you need to change the backcolor

Sub changeme()
Dim octrl As Object
'change slide number and name to suit
Set octrl = ActivePresentation.Slides(1).Shapes("CommandButton 1").OLEFormat.Object
octrl.BackColor = &HFF
End Sub


If you explain exactly what you are trying achieve there may be a better method
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: How to change color of a CommandButton CommandButton, 3 PCs with 3 different office(s) CYFire Excel Programming 1 12-13-2015 05:31 AM
VBA: How to change color of a CommandButton CommandButton random statu cromano Word VBA 7 06-13-2014 07:40 AM
VBA: How to change color of a CommandButton Email Document via Commandbutton aqhibjaveed Word VBA 1 03-25-2013 11:22 PM
VBA: How to change color of a CommandButton change One highlight Color to Another Redbarn Word VBA 1 03-16-2013 02:03 PM
color change for same shape ajkiran PowerPoint 1 11-10-2012 07:41 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft