Skip to content

Commit 71e3204

Browse files
committed
v3.2.2
1 parent 80ce3cf commit 71e3204

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/LO Basic/VBAExpressionsLib/VBAexpressions.xba

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Private P_ENFORCE_BOOLEAN As Boolean
173173
Private P_FORMATRESULT As Boolean
174174
Private P_GALLOPING_MODE As Boolean
175175
Private P_RESULT As Variant
176-
Private P_SCOPE As Object
176+
Private P_SCOPE As VBAexpressionsScope
177177
Private P_SEPARATORCHAR As String
178178
Private SubTreeData As Variant'() As String
179179
Private UserDefFunctions As ClusterBuffer
@@ -446,10 +446,8 @@ Public Property Get EvalScope() As Object
446446
Set EvalScope = P_SCOPE
447447
End Property
448448

449-
Public Property Set EvalScope(aObject As Object)
450-
If VarType(VBAexpressionsScope) = "VBAexpressionsScope" Then
451-
Set P_SCOPE = aObject
452-
End If
449+
Public Property Set EvalScope(aObject As VBAexpressionsScope)
450+
Set P_SCOPE = aObject
453451
End Property
454452

455453
''' <summary>
@@ -2218,6 +2216,8 @@ Public Function Create(ByRef aExpression As Variant, Optional resetScope As Bool
22182216
P_EXPRESSION = aExpression
22192217
If resetScope Then
22202218
VariablesInit ExprToEval
2219+
Else
2220+
ParseVariables ExprToEval
22212221
End If
22222222
ExprToEval = SBracketsNotationToNominal(ExprToEval)
22232223
Parse ExprToEval

src/VBAexpressions.cls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,8 @@ Public Function Create(ByRef aExpression As Variant, Optional resetScope As Bool
22382238
P_EXPRESSION = aExpression
22392239
If resetScope Then
22402240
VariablesInit ExprToEval
2241+
Else
2242+
ParseVariables ExprToEval
22412243
End If
22422244
ExprToEval = SBracketsNotationToNominal(ExprToEval)
22432245
Parse ExprToEval

0 commit comments

Comments
 (0)