--- basic.orig/source/classes/sbunoobj.cxx	2006-10-23 12:11:14.000000000 +0100
+++ basic/source/classes/sbunoobj.cxx	2006-10-26 12:55:51.000000000 +0100
@@ -72,6 +72,7 @@
 #include <com/sun/star/beans/PropertyConcept.hpp>
 #include <com/sun/star/beans/MethodConcept.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/script/XNULLWrapper.hpp>
 #include <com/sun/star/script/BasicErrorException.hpp>
 #include <com/sun/star/script/XAllListener.hpp>
 #include <com/sun/star/script/XInvocationAdapterFactory.hpp>
@@ -700,6 +701,17 @@ void unoToSbxValue( SbxVariable* pVar, c
 					}
 				}
 			}
+			if ( SbiRuntime::isVBAEnabled() )
+			{
+
+				Reference< XNULLWrapper > xNULL;
+				if ( aValue >>= xNULL )
+				{
+					pVar->PutEmpty();
+					pVar->SetType( SbxNULL );
+					break;
+				} 
+			}
 			// SbUnoObject instanzieren
 			String aName;
 			SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aValue );
--- udkapi.orig/com/sun/star/script/makefile.mk	2006-05-05 11:15:08.000000000 +0100
+++ udkapi/com/sun/star/script/makefile.mk	2006-10-26 10:06:14.000000000 +0100
@@ -76,6 +76,7 @@ IDLFILES=\
 	XInvocationAdapterFactory2.idl\
 	XInvocation.idl\
 	XInvocation2.idl\
+	XNULLWrapper.idl\
 	InvocationInfo.idl\
 	MemberType.idl\
 	XLibraryAccess.idl\
--- /dev/null	
+++ udkapi/com/sun/star/script/XNULLWrapper.idl	
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7965 $
+ *
+ *  last change: $Author: noelpwer $ $Date: 2006-10-27 12:00:32 +0200 (Pá, 27 říj 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_XNULLWrapper_idl__
+#define __com_sun_star_script_XNULLWrapper_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+//=============================================================================
+module com {  module sun {  module star { module script {
+
+//=============================================================================
+/** Allows a NULL to be passed between different language 
+    boundries. UNO does not natively represent a NULL.
+    For instance in basic there is a specific null type, to
+    be able to indicate to basic that a NULL is required we
+    need this structure.
+*/
+
+    /** This struct is effectively a placeHolder
+    */
+interface XNULLWrapper : com::sun::star::uno::XInterface
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
+
