Hi Rajesh,

Refer --> http://msdn.microsoft.com/en-us/library/aa206146(office.11).aspx
ColorIndex - Returns or sets the color of the border. The color is
specified as an index value into the current color palette, or as a
XlColorIndex constant. This property specifies a color as an index
into the workbook color palette. You can use the Colors method to
return the current color palette as you've used in the second line of
your code.

ColorIndex has pre-defined 56 colors which you can assign to the font
color, background color, border color etc. but using color method, you
can make your own color using RGB method or can assign vb constants
like vbRed or vbYellow etc.

For e.g. To color background as gray, you can use any of the following
statement:
Columns(2).Interior.ColorIndex = 56
or
Columns(2).Interior.Color = RGB(80,80,80)



PS: In future please do not send attachments, rather try to elaborate
your problem efficiently. The group is to help and solve your issues
not your projects.



________________________________________
Thanks & Regards
Ashish Jain
McKinsey India Knowledge Center
(Microsoft Certified Application Specialist)
(Microsoft Certified Professional)
http://www.excelitems.com
http://www.openexcel.com
________________________________________




On Nov 16, 9:16 pm, Rajesh K R <rajeshkainikk...@gmail.com> wrote:
> Hi Experts,
>
> Is it possible to use colour index code if i am using a background
> color on the sheet,pls find the attatchment and find a solution.
>
> Thanks in advance
> Regards
> Rajesh kainikkara
>
>  ATTENDANCE.XLS
> 33KViewDownload

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to