人気ブログランキング | 話題のタグを見る

Fast Solution to Problem: Color a Shape

Color a Shape

I am trying to to assign a color to a Shape that is the same color as the background color of a cell.
 Code like:

ActiveSheet.Shapes("MyShape").Fill.ForeColor.SchemeColor = Range("A1").Interior.ColorIndex

does not throw an exception, but the assigned color is wrong.

Is there an easy way to assign SchemeColor values based on ColorIndex values?
Do I need a translation table?


I would like this to work on Excel 2007 and versions of Excel prior to 2007.

Solutions to the Problem Color a Shape

Download Error Fixer (Free)

SchemeColor was introduced in Excel 2007 so you can't use it in older versions.
Shapes don't have a ColorIndex property, so you should use the Color of the interior of the cell:
 
ActiveSheet.Shapes("MyShape").Fill.ForeColor.RGB = Range("A1").Interior.Color

In this method we will try to Boot in Safe mode with Networking and see if the error still persists.

  • Search "MSCONFIG" and Open.
  • Click on Boot Tab
  • Tick Safe Boot in Boot Option
  • Select Network.
  • Click Apply and OK.
  • Reboot your System.

Recommended Method to Repair the Problem: Color a Shape:

How to Fix Color a Shape with SmartPCFixer?

1. Download Error Fixer . Install it on your computer.  Click Scan, and it will perform a scan for your computer. The junk files will be shown in the scan result.

2. After the scan is finished, you can see the errors and problems need to be fixed. Click Fix All.

3. The Fixing part is done, the speed of your computer will be much higher than before and the errors have been fixed.


Related: Cannot Download Flashplayer,Cannot Install Windows Update Error 8024A000,Cannot Display Website/ DNS/UNABLE TO CONNECT TO WEBSITE,Cannot Find Driver For Conexant AC-Link Audio Driver For Windows 7,Cannot Edit Hyperlink Using Alt F9,Cannot Open My Layout & Editing Program,Cannot Open XML Links In Excel 2010.,Cannot Open MSSQL$ACT7 Service Since Updating To Windows 8.1,Canon Zoom Browser EX Won't Work Error "Zb Module Has Encountered A Problem And Will Close",Cannot View Certain Pictures And Videos In Internet Explorer 8,Changing The Number Of Logical Processors.,CD Writer Not Functioning / Not Recognised By XP,Can’t Download Apps From Windows Store,Change What Programs Open When I Log Into My Computer,Checkbook Register Zero Colum Display
Read More: Fast Solution to Error: Check consistency message,Fast Solution to Error: Change what programs open when I log into my computer,Change cell color when if/then is true [Anwsered],Fast Solution to Problem: Change PC settings and Metro Apps Constantly Crashing\/Not Working.,[Anwsered] child's laptop is not able to connect to internet even though i have a westell wireless,Cannot display Chinese in the NotePad6.1 (Win 7),Cannot add favorites “Unspecified error”. - Cannot create a Favorites in a new folder,cant set yahoo mail as default using VISTA I downloaded and installedlatest messenger and toolbar,Cant boot into windows 8 after resizing primary drive.,Ccleaner, Malwarebytes does not open up
by NoOutputDevice | 2016-09-19 17:26