Results 1 to 4 of 4

Thread: [RESOLVED] create calendar with msflexgrid flexgrid grid control

Threaded View

  1. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: create calendar with msflexgrid flexgrid grid control

    Like this
    "vb" Code:
    1. .Row = 1
    2.  .Col = 0
    3.  .Text = 1
    4.  .Row = 1
    5.  .Col = 1
    6.  .Text = 2
    7.  .Row = 1
    8.  .Col = 2
    9.  .Text = 3

    Although, you need to figure out how to connect the month to how many days it has so the correct number of days for each month is displayed because not every month has 31 days

    Edit:

    I have done it for you.

    vb Code:
    1. Option Explicit
    2.   Dim days As Integer, i As Integer
    3. Private Sub cmdSetup_Click()
    4.  Dim c As Integer
    5.     Dim r As Integer
    6.     With MSFlexGrid1
    7.           .Row = 1
    8.           .Col = 6
    9.           End With
    10.         Select Case cboMonth
    11.         Case "January"
    12.          days = 31
    13.         Case "February"
    14.          days = 28
    15.         Case "March"
    16.          days = 31
    17.         Case "April"
    18.          days = 30
    19.         Case "May"
    20.          days = 31
    21.         Case "June"
    22.          days = 30
    23.         Case "July"
    24.          days = 31
    25.         Case "August"
    26.          days = 31
    27.         Case "September"
    28.          days = 30
    29.         Case "October"
    30.          days = 31
    31.         Case "November"
    32.          days = 30
    33.         Case "December"
    34.          days = 31
    35.         End Select
    36.         With MSFlexGrid1
    37.          For i = 1 To days
    38.           .Text = i
    39.            If .Col = 6 Then
    40.              .Row = .Row + 1
    41.              .Col = 0
    42.              Else
    43.               .Col = .Col + 1
    44.            End If
    45.          Next i
    46.         End With
    47. End Sub
    Last edited by Nightwalker83; Jan 21st, 2013 at 09:47 PM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width