• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Prevent the cells from being colored black.


New Member
[QUOTE = "NARAYANK991, message: 256969, membre: 1512"]
Salut ,

Voir le fichier attaché.

Pouvez vous expliquez s'il vous plait,Merci.
Je vous adore NARAYANK991, toujours aussi perspicace.


Excel Ninja
Hi ,

Only a check for the interior color of the selected cell has been introduced.
    Const BlackInterior = 4210752
    If ActiveCell.Interior.Color <> BlackInterior Then
The color value for a black cell (at least the shade of black which you have used) is 4210752.

I have defined a constant named BlackInterior , since it is easier to remember a name like this rather than a value like 4210752.

The code then checks for whether the interior color of the cell where the cursor is placed is this color or not ; only if it is not this color , the buttons Buton and Effacer will work , since this same check has been used in both the macros.