MSFlexGrid
I no have idea how to reduce the coding by controlling the MSFlexGrid. The following is my coding.
Public Sub ResultToGrid(Flex As MSFlexGrid)
Select Case mux_count
'******************************* Unit 1 - 10 ***********************************
Case 0
'Channel 0
'Temperature 25C
With Flex
.Row = 2
.Col = 2
.Text = frmMain.lst25C.List(0)
.Col = 3
.Text = frmMain.lst25C1080.List(0)
.Col = 4
.Text = frmMain.lst25C790.List(0)
.Col = 5
.Text = frmMain.lst25C500.List(0)
'Temperature 70C
.Row = 2
.Col = 6
.Text = frmMain.lst70C.List(0)
.Col = 7
.Text = frmMain.lst70C1080.List(0)
.Col = 8
.Text = frmMain.lst70C500.List(0)
'Temperature -10C
.Row = 2
.Col = 9
.Text = frmMain.lst10C.List(0)
.Col = 10
.Text = frmMain.lst10C1080.List(0)
.Col = 11
.Text = frmMain.lst10C500.List(0)
End With
Case 1
'Channel 1
'Temperature 25C
With Flex
.Row = 3
.Col = 2
.Text = frmMain.lst25C.List(1)
.Col = 3
.Text = frmMain.lst25C1080.List(1)
.Col = 4
.Text = frmMain.lst25C790.List(1)
.Col = 5
.Text = frmMain.lst25C500.List(1)
'Temperature 70C
.Col = 6
.Text = frmMain.lst70C.List(1)
.Col = 7
.Text = frmMain.lst70C1080.List(1)
.Col = 8
.Text = frmMain.lst70C500.List(1)
'Temperature -10C
.Col = 9
.Text = frmMain.lst10C.List(1)
.Col = 10
.Text = frmMain.lst10C1080.List(1)
.Col = 11
.Text = frmMain.lst10C500.List(1)
End With
End Select
End Sub
Basically my mux_count is up to 80, I dun want use this code to control the MSFlexGrid, so any1 knw hw to reduce the code? Thanks......
|