I'm using VB .net to open an excel file for reading.
Everything works great when running on a machine with
Visual Studio .Net installed. However when I try to
distribute the application I get then following error when
the code accesses the excel file. I'm guessing it is
something similar to
http://support.microsoft.com/default.aspx?scid=kb;en-
us;810098#appli esto
However I tried this and still the same problem.
Any help will be appreciated.
thanks
************** Exception Text **************
System.NullRefe renceException: Object reference not set to
an instance of an object.
at Excel.Workbooks .Open(String Filename, Object
UpdateLinks, Object ReadOnly, Object Format, Object
Password, Object WriteResPasswor d, Object
IgnoreReadOnlyR ecommended, Object Origin, Object
Delimiter, Object Editable, Object Notify, Object
Converter, Object AddToMru, Object Local, Object
CorruptLoad)
at geTool.mform.Bu tton1_Click(Obj ect sender, EventArgs
e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs
mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m,
MouseButtons button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage
(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc
(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorl
ib.dll
----------------------------------------
geTool
Assembly Version: 1.0.1390.15453
Win32 Version: 1.0.1390.15453
CodeBase: file:///C:/ppo/geTool.exe
----------------------------------------
System.Windows. Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows. forms/1.0.50
00.0__b77a5c561 934e089/system.windows. forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77 a5c56
1934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__
b03f5f7f11d50a3 a/system.drawing. dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77
a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77 a
5c561934e089/system.xml.dll
----------------------------------------
AxInterop.OWC
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/ppo/AxInterop.OWC.D LL
----------------------------------------
Interop.OWC
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/ppo/Interop.OWC.DLL
----------------------------------------
Microsoft.Visua lBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visua lbasic/7.0.5
000.0__b03f5f7f 11d50a3a/microsoft.visua lbasic.dll
----------------------------------------
Interop.Excel
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/ppo/Interop.Excel.D LL
----------------------------------------