Hola amigos, tengo el siguiente codigo el cual me incrementa las columnas del Msflexgrid en .5 pero quiero que me las incremente en 0.0020 No he podido lograrlo espero y alguien pueda darme un tip.
Codigo:
Private Sub Command3_Click(Index As Integer)
tabla.Clear
Command2.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Label7.Visible = True
Label8.Visible = True
Label3.Visible = True
Label4.Visible = True
tabla.Visible = True
Dim SG2, SG602 As Single
Dim T As Single
Dim C, R As Integer
Dim BT As Integer
BT = 60
If ((a1.text <> "") And (a2.text <> "") And (t1.text <> "") And (t2.text <> "")) Then
tabla.Cols = (a2 - a1) * 2 + 2
tabla.Rows = (t2 - t1) * 2 + 2
T = t1
R = 0
While (T <= t2)
SG2 = a1
C = 0
While (SG2 <= a2)
If (C = 0) Then
tabla.Col = C
tabla.Row = R + 1
tabla.text = T
End If
If (R = 0) Then
tabla.Col = C + 1
tabla.Row = R
tabla.text = SG2
End If
SG602 = calcular_SG2(SG2, T)
tabla.Col = C + 1
tabla.Row = R + 1
tabla.text = SG602
tabla.text = Format(tabla.text, "#,##0.0000")
If ((SG2 >= 0.6535) And (SG2 <= 0.7795) And (T >= 150) And (T <= 200)) Then
SG602 = SG602
tabla.CellForeColor = &HFF0000
End If
If ((SG2 >= 0.7795) And (SG2 <= 0.825) And (T >= 200) And (T <= 250)) Then
SG602 = SG602
tabla.CellForeColor = &HFF0000
End If
If ((SG2 >= 0.825) And (SG2 <= 1.076) And (T >= 250) And (T <= 300)) Then
SG602 = SG602
tabla.CellForeColor = &HFF0000
End If
SG2 = SG2 + 0.5
C = C + 1
Wend
T = T + 0.5
R = R + 1
Wend
Else
MsgBox ("Faltan datos por capturar")
End If
End Sub