K
KT_1010
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.)
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.)