Skip to content

Commit d78a060

Browse files
committed
FIX: a form or report wirh an empty VBA module caused a crash
1 parent 1b2f48a commit d78a060

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/modules/DeclarationDict.cls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ Public Sub ImportVBComponent(ByVal VBComponent2Import As VBComponent)
162162
End Sub
163163

164164
Public Sub ImportCodeModule(ByVal CodeModule2Import As CodeModule)
165-
ImportCode CodeModule2Import.Lines(1, CodeModule2Import.CountOfLines)
165+
If CodeModule2Import.CountOfLines > 0 Then
166+
ImportCode CodeModule2Import.Lines(1, CodeModule2Import.CountOfLines)
167+
End If
166168
End Sub
167169

168170
Public Sub ImportCode(ByVal Code As String)

0 commit comments

Comments
 (0)