here my code to fill the column:
possible to colorize the font in bold with the color in rectangle.?
are the steep of hour from breakfast lunch and dinner
Code:
Private Sub CREA_LVORARI()
Dim DA As Date, A As Date
Dim D As Date
If Not (RS Is Nothing) Then
If (RS.State And adStateOpen) = adStateOpen Then RS.Close
Set RS = Nothing
End If
SQL = "SELECT * FROM TIPO_SERVIZIO"
Set RS = New ADODB.Recordset
RS.CursorLocation = adUseClient
RS.Open SQL, CON, adOpenForwardOnly, adLockReadOnly
RS.Sort = ("ID")
With Me.LVORARI
LockWindowUpdate Me.hwnd
.ColumnHeaders.Clear
.ColumnHeaders.Add , , "TAVOLO", 2000
.ColumnHeaders.Add , , "DATA", 1000, lvwColumnCenter
.ColumnHeaders.Add , , "INDICE", 0, lvwColumnCenter
Do While Not RS.EOF
DA = RS.Fields(2).Value
A = RS.Fields(3).Value
For D = DA To A + 0.000001 Step TimeSerial(0, 30, 0)
.ColumnHeaders.Add , , Format$(D, "HH:MM"), 600, lvwColumnCenter
Next D
RS.MoveNext
Loop
.ColumnHeaders.Add , , "FULL", 700, lvwColumnCenter
LockWindowUpdate 0&
End With
If Not (RS Is Nothing) Then
If (RS.State And adStateOpen) = adStateOpen Then RS.Close
Set RS = Nothing
End If
End Sub
possible to colorize the font in bold with the color in rectangle.?
are the steep of hour from breakfast lunch and dinner