Sie sind auf Seite 1von 1

Option Explicit Dim days As Integer, i As Integer Private Sub cmdSetup_Click() Dim c As Integer Dim r As Integer With MSFlexGrid1

.Row = 1 .Col = 6 End With Select Case cboMonth Case "January" days = 31 Case "February" days = 28 Case "March" days = 31 Case "April" days = 30 Case "May" days = 31 Case "June" days = 30 Case "July" days = 31 Case "August" days = 31 Case "September" days = 30 Case "October" days = 31 Case "November" days = 30 Case "December" days = 31 End Select With MSFlexGrid1 For i = 1 To days .Text = i If .Col = 6 Then .Row = .Row + 1 .Col = 0 Else .Col = .Col + 1 End If Next i End With End Sub

Das könnte Ihnen auch gefallen