--- basic/source/runtime/step0.cxx	2007-10-18 10:04:59.000000000 +0100
+++ basic/source/runtime/step0.cxx	2007-10-23 16:17:36.000000000 +0100
@@ -323,8 +323,10 @@ void SbiRuntime::StepIS()
 	SbxVariableRef refVar2 = PopVar();
 	BOOL bRes = BOOL(
 		refVar1->GetType() == SbxOBJECT
-	 && refVar2->GetType() == SbxOBJECT
-	 && refVar1->GetObject() == refVar2->GetObject() );
+	 && refVar2->GetType() == SbxOBJECT );
+	if ( bVBAEnabled  && !bRes )
+		Error( SbERR_INVALID_USAGE_OBJECT );
+	bRes = ( bRes && refVar1->GetObject() == refVar2->GetObject() );
 	SbxVariable* pRes = new SbxVariable;
 	pRes->PutBool( bRes );
 	PushVar( pRes );
