Hello Friends,
I have a form with the following code to list the modules in the immediate window. I want that the results shown in immdiate windows should appear on the same form.How should i change my code?
[/code]
Private Sub Command27_Click()
On Error GoTo Err_Command27
Dim lngCounterA As Long, lngCounterB As Long, lngCounterC As Long
Dim modModule As Module
Dim zahl ' das ist Dein Zähler
Dim zahl1
Dim zahl2
For lngCounterA = 0 To Modules.Count - 1
Set modModule = Modules.Item(lngCounterA)
zahl = 0
With modModule
For lngCounterB = 1 To .CountOfLines
If Trim(.Lines(lngCounterB, 1)) = "EOF" Then
' .ReplaceLine lngCounterB, "Washington"
zahl = zahl + 1
End If
Next lngCounterB
Debug.Print "EOF kam im Modul " & modModule & " " & zahl & " mal vor."
zahl1 = 0
For lngCounterC = 1 To .CountOfLines
If Trim(.Lines(lngCounterC, 1)) = "Recordset" Then
' .ReplaceLine lngCounterC, "Washington"
zahl1 = zahl1 + 1
End If
Next lngCounterC
End With
Debug.Print "Recordset kam im Modul " & modModule & " " & zahl1 & " mal vor."
Next lngCounterA
Exit_Command27:
Exit Sub
Err_Command27:
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
Resume Exit_Command27
End Sub
I have a form with the following code to list the modules in the immediate window. I want that the results shown in immdiate windows should appear on the same form.How should i change my code?
[/code]
Private Sub Command27_Click()
On Error GoTo Err_Command27
Dim lngCounterA As Long, lngCounterB As Long, lngCounterC As Long
Dim modModule As Module
Dim zahl ' das ist Dein Zähler
Dim zahl1
Dim zahl2
For lngCounterA = 0 To Modules.Count - 1
Set modModule = Modules.Item(lngCounterA)
zahl = 0
With modModule
For lngCounterB = 1 To .CountOfLines
If Trim(.Lines(lngCounterB, 1)) = "EOF" Then
' .ReplaceLine lngCounterB, "Washington"
zahl = zahl + 1
End If
Next lngCounterB
Debug.Print "EOF kam im Modul " & modModule & " " & zahl & " mal vor."
zahl1 = 0
For lngCounterC = 1 To .CountOfLines
If Trim(.Lines(lngCounterC, 1)) = "Recordset" Then
' .ReplaceLine lngCounterC, "Washington"
zahl1 = zahl1 + 1
End If
Next lngCounterC
End With
Debug.Print "Recordset kam im Modul " & modModule & " " & zahl1 & " mal vor."
Next lngCounterA
Exit_Command27:
Exit Sub
Err_Command27:
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
Resume Exit_Command27
End Sub
Code: