|
-
Jan 21st, 2013, 08:32 PM
#1
Thread Starter
Junior Member
[RESOLVED] create calendar with msflexgrid flexgrid grid control
please finish for me or help. No need for years. January, March, May, July, August, October, December have 31 days. September, April, June, November have 30 days.
Code:
Private Sub Form_Load()
Dim C As Integer
Dim R As Integer
cboMonth.AddItem "January"
cboMonth.AddItem "February"
cboMonth.AddItem "March"
cboMonth.AddItem "April"
cboMonth.AddItem "May"
cboMonth.AddItem "June"
cboMonth.AddItem "July"
cboMonth.AddItem "August"
cboMonth.AddItem "September"
cboMonth.AddItem "October"
cboMonth.AddItem "November"
cboMonth.AddItem "December"
cboDay.AddItem "Monday"
cboDay.AddItem "Tuesday"
cboDay.AddItem "Wednesday"
cboDay.AddItem "Thursday"
cboDay.AddItem "Friday"
cboDay.AddItem "Saturday"
cboDay.AddItem "Sunday"
MSFlexGrid1.Rows = 6
MSFlexGrid1.Cols = 7
MSFlexGrid1.FixedCols = 0
For C = 0 To MSFlexGrid1.Cols - 1
MSFlexGrid1.ColWidth(C) = 600
Next C
For R = 0 To MSFlexGrid1.Rows - 1
MSFlexGrid1.RowHeight(R) = 600
Next R
With MSFlexGrid1
.Row = 0
.Col = 0
.Text = "Mon"
.Col = 1
.Text = "Tue"
.Col = 2
.Text = "Wed"
.Col = 3
.Text = "Thu"
.Col = 4
.Text = "Fri"
.Col = 5
.Text = "Sat"
.Col = 6
.Text = "Sun"
End With
End Sub
Last edited by firezap; Jan 21st, 2013 at 08:38 PM.
-
Jan 21st, 2013, 08:41 PM
#2
Re: create calendar with msflexgrid flexgrid grid control
What do you need help with? We can not do the whole project for you.
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
-
Jan 21st, 2013, 09:01 PM
#3
Thread Starter
Junior Member
Re: create calendar with msflexgrid flexgrid grid control
how do i put numbers 1 to 31 across
-
Jan 21st, 2013, 09:15 PM
#4
Re: create calendar with msflexgrid flexgrid grid control
Like this
"vb" Code:
.Row = 1 .Col = 0 .Text = 1 .Row = 1 .Col = 1 .Text = 2 .Row = 1 .Col = 2 .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:
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
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|