--- /data4/sles/ooo-buildCopy/ooo-build/build/src680-m125/basic/source/runtime/step2.cxx	2005-09-20 15:48:29.000000000 +0100
+++ basic/source/runtime/step2.cxx	2005-09-21 14:21:00.000000000 +0100
@@ -106,6 +106,26 @@
 		BOOL bFatalError = FALSE;
 		SbxDataType t = (SbxDataType) nOp2;
 		String aName( pImg->GetString( nOp1 & 0x7FFF ) );
+#ifdef ENABLE_VBA	
+		bool bIsVBAInterOp = SbiRuntime::isVBAEnabled(); 
+		// Hacky capture of Evaluate [] syntax
+		// this should be tackled I feel at the pcode level
+		if ( bIsVBAInterOp && aName.Search('[') == 0 ) 
+		{
+			// emulate pcode here
+			StepARGC();
+			// psuedo StepLOADSC
+			String sArg = aName.Copy( 1, aName.Len() - 2 );
+			SbxVariable* p = new SbxVariable;
+			p->PutString( sArg );
+			PushVar( p );
+			//
+			StepARGV();
+			nOp1 = nOp1 | 0x8000; // indicate params are present
+			aName = String::CreateFromAscii("Evaluate");
+		}
+#endif //ENABLE_VBA
+
 		if( bLocal )
 			pElem = refLocals->Find( aName, SbxCLASS_DONTCARE );
 		if( !pElem )
Index: basic/source/comp/makefile.mk
===================================================================
RCS file: /cvs/script/basic/source/comp/makefile.mk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 makefile.mk
--- basic/source/comp/makefile.mk	18 Sep 2000 16:12:10 -0000	1.1.1.1
+++ basic/source/comp/makefile.mk	24 Sep 2005 18:10:23 -0000
@@ -71,6 +71,10 @@
 .INCLUDE :  settings.mk
 .INCLUDE :  sv.mk
 
+.IF "$(ENABLE_VBA)"=="YES"
+	CDEFS+=-DENABLE_VBA
+.ENDIF
+
 CXXFILES= \
 	sbcomp.cxx   \
     dim.cxx      \
Index: basic/source/comp/scanner.cxx
===================================================================
RCS file: /cvs/script/basic/source/comp/scanner.cxx,v
retrieving revision 1.11
diff -u -r1.11 scanner.cxx
--- basic/source/comp/scanner.cxx	20 Sep 2004 12:30:12 -0000	1.11
+++ basic/source/comp/scanner.cxx	24 Sep 2005 18:10:56 -0000
@@ -80,6 +80,9 @@
 #include <unotools/charclass.hxx>
 #endif
 
+#ifdef ENABLE_VBA
+#include <runtime.hxx>
+#endif //ENABLE_VBA
 
 SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf )
 {
@@ -437,7 +440,15 @@
 				if( *pLine != cSep || cSep == ']' ) break;
 			} else aError = cSep, GenError( SbERR_EXPECTED );
 		}
+#ifdef ENABLE_VBA	
+		// If VBA Interop then doen't eat the [] chars	
+		if ( cSep == ']' && SbiRuntime::isVBAEnabled() )
+			aSym = aLine.copy( n - 1, nCol - n  + 1);
+		else
+			aSym = aLine.copy( n, nCol - n - 1 );
+#else
 		aSym = aLine.copy( n, nCol - n - 1 );
+#endif
 		// Doppelte Stringbegrenzer raus
 		String s( cSep );
 		s += cSep;
