|
-
Jan 12th, 2000, 11:33 PM
#1
Thread Starter
Addicted Member
I am using the following code to color all the cells in column 1 and 2. However, only the first two rows of columns 1 and 2 are changing color.
With MSFlexGrid1
.col = 1
.cellbackcolor = vbRed
.col = 2
.cellbackcolor = vbblue
End With
Can someone show me a method to color the entire 2 columns.
-
Jan 12th, 2000, 11:54 PM
#2
Hyperactive Member
you need to cycle through the rows.
for intI = 0 to MSFlexGrid1.rows -1
.row = inti
'do the col colors here
next inti
-
Jan 12th, 2000, 11:58 PM
#3
An easier method would be to set the RowSel property and also set the FillStyle Property to flexFillRepeat, ie.
Code:
Private Sub Command1_Click()
With MSFlexGrid1
.Row = 0
.Col = 1
.FillStyle = flexFillRepeat
.RowSel = .Rows - 1
.ColSel = 1
.CellBackColor = vbRed
.Col = 2
.ColSel = 2
.RowSel = .Rows - 1
.CellBackColor = vbBlue
.Col = 0
.FillStyle = flexFillSingle
End With
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Jan 13th, 2000, 12:03 PM
#4
Hyperactive Member
Aaron, I didn't think of that. I forgot about the FillRepeat option. That would work way better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|