Skip to content

Commit 6530e5f

Browse files
authored
Merge pull request #6 from hrschupp/issue2
FIX: a form or report wirh an empty VBA module caused a crash
2 parents b86cf4b + d78a060 commit 6530e5f

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)