Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i am having difficulty getting this to work. basically, this part of the program is to reset the colored fonts an interior color of the cells etc from the last run of the macro. I'm getting an error, AND also, when this is executed, the "fake default gridlines disappear altogether. Can someone steer me in th right direction? thank you. ActiveSheet.Cells.Font.ColorIndex = xlColorIndexAutomatic ActiveSheet.Cells.Interior.ColorIndex = xlColorIndexAutomatic ActiveSheet.GridlineColorIndex = xlColorIndexAutomatic 'the last one is the troublesome lin ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() actually on further testing, the second line is the problem. This was only supposed to change the cells with colored background bac to origional default.. Instead it eliminates the grey default gridline that excel has (which dont print) I would like to have those visible, is there a way to erase th interior color of the cells and not eliminate the grey gridlines ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure, use the correct constant which is xlNone or xlColorIndexNone
This is spelled out pretty clearly in the help for the colorindex property: For interior: Set this property to xlColorIndexNone to specify that you don't want an interior fill. -- Regards, Tom Ogilvy "chick-racer" wrote in message ... actually on further testing, the second line is the problem. This was only supposed to change the cells with colored background back to origional default.. Instead it eliminates the grey default gridlines that excel has (which dont print) I would like to have those visible, is there a way to erase the interior color of the cells and not eliminate the grey gridlines? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.Cells.Font.ColorIndex = xlColorIndexAutomatic
ActiveSheet.Cells.Interior.ColorIndex = xlColorIndexNone Not sure what you are trying to do with the last command, but if you have used borders, then you need to work with the borders object. Turn on the macro recorder and make the changes you want to get the code. -- Regards, Tom Ogilvy "chick-racer" wrote in message ... i am having difficulty getting this to work. basically, this part of the program is to reset the colored fonts and interior color of the cells etc from the last run of the macro. I'm getting an error, AND also, when this is executed, the "fake" default gridlines disappear altogether. Can someone steer me in the right direction? thank you. ActiveSheet.Cells.Font.ColorIndex = xlColorIndexAutomatic ActiveSheet.Cells.Interior.ColorIndex = xlColorIndexAutomatic ActiveSheet.GridlineColorIndex = xlColorIndexAutomatic 'the last one is the troublesome line ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Question 1 of ??? | Excel Worksheet Functions | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
The question is an excel question that I need to figure out howto do in excel. | Excel Worksheet Functions |