LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Cells(row, j).Interior.colorindex

I wanted to set the color for a row to a specific value

for i = 1 to 30
Cells(ActiveCell.row, i).interior.colorindex = colIndex
next i

which should set the property for the first 30 cells of the current
row

The debugger aborts when it comes to this line, and I can't figure out
why

I've tried
myRow = ActiveCell.row (which should be the row
of the target cell)
With Worksheet("target").Cells(myRow, i)
.interior.colorindex = 33
.font.colorindex = 2
End with


which also doesn't work.
I had thought that Cells(i,j) assumed the current worksheet (and of
type Range)
(ActiveSheet.Cells(i,j) was a Range of one cell

also ActiveSheet.Rows(myRow).interior.colorindex also fails

how do I specify a range object that is the row that contains the
ActiveCell

(i've been trying to use the object browser to find a combination that
has the right syntax without much success.)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select contiguous cells by ActiveCell.Interior.ColorIndex and applyborders nofam Excel Programming 13 March 17th 10 08:50 AM
interior.colorindex does not work? bst Excel Programming 11 June 28th 08 02:05 PM
problem with interior.colorindex Peter Rooney Excel Programming 7 January 20th 06 12:31 PM
Use of Interior.ColorIndex liquidhot Excel Programming 4 June 27th 05 07:22 PM
Testing for Interior.ColorIndex JeffBo Excel Programming 7 May 17th 04 09:41 PM


All times are GMT +1. The time now is 11:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"