1

MSAccessにVisualStudioタスクリストに相当するものはありますか?

TODOをコードに入れて、開いているものを一目で確認できるようにしたいと思います。

4

1 に答える 1

3

楽しむ :)

Sub ToDoList()
Dim afind As Variant
Dim sfound as String
Dim mdl As Object
Dim modtext As String, modarray As Variant
Dim leline As Long
Dim i, j, k   

afind = Split("HACK,TODO", ",")

For i = 1 To VBE.ActiveVBProject.VBComponents.Count
    Set mdl = VBE.ActiveVBProject.VBComponents(i).CodeModule
    leline = mdl.CountOfLines
    If leline > 0 Then
        modtext = mdl.Lines(1, leline)           
        For j = 0 To UBound(afind)
            If InStr(modtext, afind(j)) > 0 Then
                sfound = sfound & vbCrLf & "****" & afind(j) _
                       & " found in " & mdl.Name
                modarray = Split(modtext, vbCrLf)
                For k = 0 To UBound(modarray)
                    If InStr(modarray(k), afind(j)) > 0 Then
                        sfound = sfound & vbCrLf & k
                        sfound = sfound & "  " & modarray(k)
                    End If
                Next
            End If
        Next
    End If
Next

MsgBox sfound
End Sub
于 2012-06-19T15:43:31.267 に答える