VB6.0用掲示板の過去のログ(No.1)−VBレスキュー(花ちゃん)
[記事リスト] [新規投稿] [新着記事] [ワード検索] [過去ログ] [管理用]

投稿日: 2004/03/26(Fri) 22:50
投稿者花ちゃん
Eメール
URL
タイトル私が作るなら

Private Sub Command1_Click()
    Dim yy1  As Integer
    Dim mm1  As Integer
    Dim dMax As Integer
    Dim i    As Integer
    yy1 = "2004"
    mm1 = "4"
    dMax = Day(DateAdd("d", -1, DateAdd("m", 1, DateValue(yy1 & "/" & mm1))))
  
    With MSFlexGrid1
        .Cols = dMax + 1
        .FixedCols = 0
        .Rows = 5
        .FixedRows = 2
        For i = 1 To dMax
            .Col = i: .Row = 0
            .CellAlignment = flexAlignCenterCenter
            .Col = i: .Row = 1
            .CellAlignment = flexAlignCenterCenter
            .Col = i: .Row = 2
            .CellAlignment = flexAlignCenterCenter
    
            .TextMatrix(0, i) = i
            .TextMatrix(1, i) = Format$(yy1 & "/" & mm1 & "/" & CStr(i), "aaa")
            If .TextMatrix(1, i) = "日" Then
                .Col = i: .Row = 1
                .CellBackColor = vbRed
            End If
        Next i
            '休日の処理
            Dim Tbl(4) As String
            Dim AddDat   As Variant
            Tbl(4) = "3,10,17,24,29"
            AddDat = Split(Tbl(4), ",")
            For i = LBound(AddDat) To UBound(AddDat)
                .Col = AddDat(i): .Row = 1
                .CellBackColor = vbRed
            Next i

            .TextMatrix(2, 0) = "青木"
            .TextMatrix(2, 1) = "○"
            .TextMatrix(2, 2) = "○"
            .TextMatrix(2, 3) = "×"
            .TextMatrix(2, 4) = "△"
    End With
End Sub

# 上記は完成品ではありません、私の考えの一部をコードに書いただけです。


- 関連一覧ツリー (★ をクリックするとツリー全体を一括表示します)

- 返信フォーム (この記事に返信する場合は下記フォームから投稿して下さい)

- Web Forum -