1 diff --git basic/source/comp/exprtree.cxx basic/source/comp/exprtree.cxx
2 index 88b51d1..8e78aba 100644
3 --- basic/source/comp/exprtree.cxx
4 +++ basic/source/comp/exprtree.cxx
5 @@ -378,8 +378,12 @@ SbiExprNode* SbiExpression::Term( void )
7 if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT )
9 - pParser->Error( SbERR_BAD_DECLARATION, aSym );
11 + // defer error until runtime if in vba mode
12 + if ( !pParser->IsVBASupportOn() )
14 + pParser->Error( SbERR_BAD_DECLARATION, aSym );
19 pNd->aVar.pNext = ObjTerm( *pDef );
20 diff --git basic/source/comp/parser.cxx basic/source/comp/parser.cxx
21 index 1a4dc06..dea8d79 100644
22 --- basic/source/comp/parser.cxx
23 +++ basic/source/comp/parser.cxx
24 @@ -405,6 +405,18 @@ BOOL SbiParser::Parse()
28 + // In vba it's possible to do Error.foobar ( even if it results in
30 + if ( eCurTok == _ERROR_ && IsVBASupportOn() ) // we probably need to define a subset of keywords where this madness applies e.g. if ( IsVBASupportOn() && SymbolCanBeRedined( eCurTok ) )
32 + SbiTokenizer tokens( *(SbiTokenizer*)this );
34 + if ( tokens.Peek() == DOT )
40 // Kommt ein Symbol, ist es entweder eine Variable( LET )
41 // oder eine SUB-Prozedur( CALL ohne Klammern )
42 // DOT fuer Zuweisungen im WITH-Block: .A=5