C
Cesar Romani
I'm trying to delete all class modules whose name begin with "struct".
If I use the following subroutine, it deletes only one module and spits the
run-time error 29068: "cannot complete this operation. You must stop the
code and try
again"
Where is the error here?
---------------------
Sub deleteModules()
Dim i As Integer
For i = CurrentProject.AllModules.Count - 1 To 0 Step -1
If Left(CurrentProject.AllModules(i).Name, 6) = "struct" Then
DoCmd.DeleteObject acModule, CurrentProject.AllModules(i).Name
End If
Next i
End Sub
If I use the following subroutine, it deletes only one module and spits the
run-time error 29068: "cannot complete this operation. You must stop the
code and try
again"
Where is the error here?
---------------------
Sub deleteModules()
Dim i As Integer
For i = CurrentProject.AllModules.Count - 1 To 0 Step -1
If Left(CurrentProject.AllModules(i).Name, 6) = "struct" Then
DoCmd.DeleteObject acModule, CurrentProject.AllModules(i).Name
End If
Next i
End Sub