Can't change border color

kotzo

Board Regular
Joined
Aug 1, 2010
Messages
119
Hi,

I an working with an excel file created by someone else, and I'm trying
with vba to change the border color of the cells

I failed, even with the normal excel commands.

The color is not changeable ...

I would post the workbook but this is not possible here.

Is there a possibility to help me with this ?

Thanks,

Tzovanis
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Right click on the cell you want the cell border to change and go to format cell. Go to the border tab and change the color from automatic and then you have to re-apply the border, it will not change automatically by just changing the color in the drop down. You still have to click and add the border.

Hope that helps and then you can record a macro doing this to get a basic idea of the code involved.

http://www.ehow.com/how_4471236_border-style-color-microsoft-excel.html
http://excel.tips.net/Pages/T002977_Changing_the_Color_of_a_Cell_Border.html

Hope that helps.
 
Upvote 0
Is there a possibility that the borders are put there by conditional formatting, which overrides manual formatting?
 
Upvote 0
Is there a possibility that the borders are put there by conditional formatting, which overrides manual formatting?


Yes the workbook has conditional formating, but still when I delete the
rules I can't change the colors with

Code:
 ActiveCell.Borders.ColorIndex = 0

or from the excel menus
 
Upvote 0
Does it come back with an error message?
Is the sheet protected?
Are there any macros/event handlers?
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top