how to compare two columns

temirlan79
09-01-2004, 05:10 AM
hello! how can i compare two columns of mshflexgrid and according to data in one column load data in second column.


my variant looks like this:

with mshflexgrid1
.col= 1
for StartRow=.fixedRow to .rows-1
.row= StartRow
if col=2 then
if .text= "new" then
.cellpicture=1 ' for example
elseif .text="modified" then
.cellpicture=2
esleif .text="submitted" then
.cellpicture=3
end if
end if
end with

Flyguy
09-03-2004, 02:07 AM
The Cellpicture is a picture object, you can't assing a number to it.

With mshflexgrid1
For StartRow = .FixedRows To .Rows - 1
Select Case .TextMatrix(StartRow, 2)
Case "new"
Set .CellPicture= Picture1.Picture ' for example
Case "modified"
Set .CellPicture= Picture2.Picture ' for example
Case "submitted"
Set .CellPicture= Picture3.Picture ' for example
End Select
Next StartRow
End With

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum