הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Friday, February 15, 2013 3:25 AM
can anybody tell how to get rid of this message.
I had corrected it on 64 bit windows 7 computer
by setting the value of debug in control panel
to 0 but it again pops up this time while clicking on a button on form
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x8002000B): Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
at Microsoft.Office.Interop.Excel.Sheets.get__Default(Object Index)
at EducountSoftware.Form1.BtnSs_Click(Object sender, EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
EducountSoftware
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Muzamil/AppData/Local/Apps/2.0/PTWHY9XD.PD7/5G2HWVV3.CL7/educ..tion_0000000000000000_0001.0000_410d3ffb02968de2/EducountSoftware.exe
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
All replies (18)
Friday, February 15, 2013 12:12 PM
Do you have the source code for this, or is this a compiled software support question?
If this is not a question about developing an application, then you should re-direct your question to and IT forum.
If this is a question about developing an application, then you should post your source code.
If you are trying to disable JIT debugging, the bottom of your message explains how to modify your app.config file to turn on/off JIT.
“If you want something you've never had, you need to do something you've never done.”
Don't forget to mark helpful posts and answers ! Answer an interesting question? Write a new article about it! My Articles |
*This post does not reflect the opinion of Microsoft, or its employees.
Friday, February 15, 2013 12:36 PM
Hello! thanks for reply!
Here is a source code. when ever i try to click a button on form i get above error.Second thing is it works fine on my computer windows 7 32 bit but it dosent work on another computer windows 7 64 bit
Option Explicit On
Imports System.Security.Permissions
Imports System.IO
Public Class Form1
Private Sub NAR(ByVal MyExcel As Object)
MyExcel = New Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws = wb.Sheets("gp1")
Try
While (System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel) > 0)
System.Runtime.InteropServices.Marshal.ReleaseComObject(ws)
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb)
System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel)
GC.Collect()
GC.WaitForPendingFinalizers()
End While
Catch
Finally
MyExcel = Nothing
End Try
End Sub
Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.Visible = False
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws = wb.Sheets("gp1")
ws.Unprotect(123)
ws.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws
ws.Unprotect(123)
Dim irow As Long
irow = ws.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws.Range("A" & ws.Rows.Count).End(XlDirection.xlUp).Row + 1
ws.Cells(irow, 1).Value = Me.txtSn.Text
ws.Cells(irow, 2).Value = Me.txtNa.Text
ws.Cells(irow, 3).Value = Me.txtGpf.Text
ws.Cells(irow, 4).Value = Me.txtBa.Text
ws.Cells(irow, 5).Value = Me.txtBn.Text
ws.Cells(irow, 6).Value = Me.txtAp.Text
ws.Cells(irow, 7).Value = Me.txtBp.Text
ws.Cells(irow, 8).Value = Me.txtGp.Text
ws.Cells(irow, 9).Value = (ws.Cells(irow, 7).Value + ws.Cells(irow, 8).Value)
Me.Lbl_Tt.Text = ws.Cells(irow, 9).Value
ws.Cells(irow, 10).Value = Me.txtPp.Text
ws.Cells(irow, 11).Value = Val(Me.txtDac.Text) / 100 * (ws.Cells(irow, 7).Value)
txtDa.Text = ws.Cells(irow, 11).Value
ws.Cells(irow, 12).Value = Me.txtMa.Text
ws.Cells(irow, 13).Value = Me.txtRa.Text
ws.Cells(irow, 14).Value = Me.txtCca.Text
ws.Cells(irow, 15).Value = Me.txtOa.Text
ws.Cells(irow, 16).Formula = (ws.Cells(irow, 9).Value + ws.Cells(irow, 10).Value + ws.Cells(irow, 11).Value + ws.Cells(irow, 12).Value + ws.Cells(irow, 13).Value + ws.Cells(irow, 14).Value + ws.Cells(irow, 15).Value)
Me.Lbl_Gt.Text = ws.Cells(irow, 16).Value
ws.Cells(irow, 17).Value = Me.txtFa.Text
ws.Cells(irow, 18).Formula = (ws.Cells(irow, 16).value - ws.Cells(irow, 17).Value)
Me.Lbl_Naf.Text = ws.Cells(irow, 18).Value
ws.Cells(irow, 19).Value = Me.txtSf.Text
ws.Cells(irow, 20).Value = Me.txtRf.Text
ws.Cells(irow, 21).Value = Me.txtSi1.Text
ws.Cells(irow, 22).Value = Me.txtSi2.Text
ws.Cells(irow, 23).Value = Me.txtSi3.Text
ws.Cells(irow, 24) = (ws.Cells(irow, 19).Value + ws.Cells(irow, 20).Value + ws.Cells(irow, 21).Value + ws.Cells(irow, 22).Value + ws.Cells(irow, 23).Value)
Me.Lbl_Ts.Text = ws.Cells(irow, 24).Value
ws.Cells(irow, 25).Formula = (ws.Cells(irow, 18).Value - ws.Cells(irow, 24).Value)
Me.Lbl_Nad.Text = ws.Cells(irow, 25).Value
ws.Cells(irow, 26).Value = ""
ws.Cells(irow, 27).Value = Me.txtHl.Text
ws.Cells(irow, 28).Value = Me.txtCsc.Text
ws.Cells(irow, 29).Value = Me.txtMr.Text
ws.Cells(irow, 30).Value = Me.txtIt.Text
ws.Cells(irow, 31).Value = (ws.Cells(irow, 25).Value - (ws.Cells(irow, 26).Value + ws.Cells(irow, 27).Value + ws.Cells(irow, 28).Value + ws.Cells(irow, 29).Value + ws.Cells(irow, 30).Value))
Me.Lbl_Np.Text = ws.Cells(irow, 31).value
MessageBox.Show("The last row in Col A of Sheet1 which has data is " & irow)
MyExcel.EnableEvents = True
MyExcel.Visible = False
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace("gp1")
ws.Protect(123)
MyExcel.GetSaveAsFilename("D:\azeo")
wb.Close(True)
wb = Nothing
MyExcel.Quit()
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End With
Me.Update()
Exit Sub
MyExcel = MyExcel.release
System.Runtime.InteropServices.Marshal.ReleaseComObject(ws)
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb)
System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel)
ws = Nothing
wb = Nothing
MyExcel = Nothing
MyExcel.Quit()
GC.Collect()
GC.WaitForPendingFinalizers()
If System.Runtime.InteropServices.Marshal.AreComObjectsAvailableForCleanup() = True Then
System.Runtime.InteropServices.Marshal.CleanupUnusedObjectsInCurrentContext()
End If
Exit Sub
Me.Update()
End Sub
Friend WithEvents Lbl_ErrorMsg As System.Windows.Forms.Label
Private Sub hScroller()
Dim hScroller As New HScrollBar()
hScroller.Height = 69
hScroller.Width = 400
Me.Controls.Add(hScroller)
hScroller.Dock = DockStyle.Bottom
hScroller.Width = 250
hScroller.Height = 200
hScroller.Name = "HScrollBar1"
hScroller.Minimum = 0
hScroller.Maximum = 100
hScroller.Value = 40
Exit Sub
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws = wb.Sheets("gp1")
ws.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws
Dim irow As Long
irow = ws.Range("A65536").End(XlDirection.xlUp).Offset(0, 0).Select
irow = ws.Range("A" & ws.Rows.Count).End(XlDirection.xlUp).Row - 0
MsgBox(" The Last Record Number is " & (wb.Application.Cells(irow, 1).Value))
MyExcel.EnableEvents = True
MyExcel.Visible = False
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace("D:\azeo")
ws.Protect(123)
MyExcel.Quit()
ws = Nothing
wb = Nothing
MyExcel = Nothing
irow = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End With
Me.Update()
Exit Sub
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.Close()
End Sub
Private Sub BtnSs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSs.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws1 As Microsoft.Office.Interop.Excel.Worksheet
ws1 = wb.Sheets("ss")
ws1.Unprotect(123)
MyExcel.Visible = True
ws1.Select()
ws1.Unprotect(123)
MyExcel.Visible = True
MyExcel.UserControl = True
With ws1
Dim irow As Long
irow = ws1.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws1.Range("A" & ws1.Rows.Count).End(XlDirection.xlUp).Row + 1
ws1.Cells(irow, 1).value = Val(irow - 2)
ws1.Cells(irow, 2).FormulaR1C1 = "=VLOOKUP(RC[-1],'gp1'!R3C1:R1000C31,2,FALSE)"
ws1.Cells(irow, 3).FormulaR1C1 = "=VLOOKUP(RC[-2],'gp1'!R3C1:R1000C31,7,FALSE)"
ws1.Cells(irow, 4).FormulaR1C1 = "=VLOOKUP(RC[-3],'gp1'!R3C1:R1000C31,8,FALSE)"
ws1.Cells(irow, 5).value = "=VLOOKUP(RC[-4],'gp1'!R3C1:R1000C31,9,FALSE)"
ws1.Cells(irow, 6).FormulaR1C1 = "= VLOOKUP(RC[-5],'gp1'!R3C1:R1000C31,10,FALSE)"
ws1.Cells(irow, 7).FormulaR1C1 = "=RC[21]%*RC[-4]"
ws1.Cells(irow, 8).FormulaR1C1 = "= VLOOKUP(RC[-7],'gp1'!R3C1:R1000C31,12,FALSE)"
ws1.Cells(irow, 9).FormulaR1C1 = "= VLOOKUP(RC[-8],'gp1'!R3C1:R1000C31,13,FALSE)"
ws1.Cells(irow, 10).FormulaR1C1 = "= VLOOKUP(RC[-9],'gp1'!R3C1:R1000C31,14,FALSE)"
ws1.Cells(irow, 11).FormulaR1C1 = "= VLOOKUP(RC[-10],'gp1'!R3C1:R1000C31,15,FALSE)"
ws1.Cells(irow, 12).FormulaR1C1 = "= VLOOKUP(RC[-11],'gp1'!R3C1:R1000C31,16,FALSE)"
ws1.Cells(irow, 13).FormulaR1C1 = "= VLOOKUP(RC[-12],'gp1'!R3C1:R1000C31,17,FALSE)"
ws1.Cells(irow, 14).FormulaR1C1 = "= VLOOKUP(RC[-13],'gp1'!R3C1:R1000C31,18,FALSE)"
ws1.Cells(irow, 15).FormulaR1C1 = "= VLOOKUP(RC[-14],'gp1'!R3C1:R1000C31,19,FALSE)"
ws1.Cells(irow, 16).FormulaR1C1 = "= VLOOKUP(RC[-15],'gp1'!R3C1:R1000C31,20,FALSE)"
ws1.Cells(irow, 17).FormulaR1C1 = "= VLOOKUP(RC[-16],'gp1'!R3C1:R1000C31,21,FALSE)"
ws1.Cells(irow, 18).FormulaR1C1 = "= VLOOKUP(RC[-17],'gp1'!R3C1:R1000C31,22,FALSE)"
ws1.Cells(irow, 19).FormulaR1C1 = "= VLOOKUP(RC[-18],'gp1'!R3C1:R1000C31,23,FALSE)"
ws1.Cells(irow, 20).FormulaR1C1 = "= VLOOKUP(RC[-19],'gp1'!R3C1:R1000C31,24,FALSE)"
ws1.Cells(irow, 21).FormulaR1C1 = "= VLOOKUP(RC[-20],'gp1'!R3C1:R1000C31,25,FALSE)"
ws1.Cells(irow, 22).FormulaR1C1 = "= VLOOKUP(RC[-21],'gp1'!R3C1:R1000C31,26,FALSE)"
ws1.Cells(irow, 23).FormulaR1C1 = "= VLOOKUP(RC[-22],'gp1'!R3C1:R1000C31,27,FALSE)"
ws1.Cells(irow, 24).FormulaR1C1 = "= VLOOKUP(RC[-23],'gp1'!R3C1:R1000C31,28,FALSE)"
ws1.Cells(irow, 25).FormulaR1C1 = "= VLOOKUP(RC[-24],'gp1'!R3C1:R1000C31,29,FALSE)"
ws1.Cells(irow, 26).FormulaR1C1 = "=VLOOKUP(RC[-25],'gp1'!R3C1:R1000C31,30,FALSE)"
ws1.Cells(irow, 27).FormulaR1C1 = "= VLOOKUP(RC[-26],'gp1'!R3C1:R1000C31,31,FALSE)"
MyExcel.EnableEvents = True
MyExcel.Visible = False
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace()
MyExcel.Save("D:\azeo")
ws1.Protect(123)
MyExcel.Quit()
ws1 = Nothing
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End With
Me.Update()
Exit Sub
End Sub
Private Sub BtnSsc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSsc.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws2 As Microsoft.Office.Interop.Excel.Worksheet
ws2 = wb.Sheets("SLI Schedule")
ws2.Unprotect()
ws2.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws2
Dim irow As Long
irow = ws2.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws2.Range("A" & ws2.Rows.Count).End(XlDirection.xlUp).Row + 1
ws2.Cells(irow, 2).FormulaR1C1 = "=VLOOKUP(RC1,ss!R3C1:R1000C27,2,FALSE)"
ws2.Cells(irow, 3).FormulaR1C1 = "=VLOOKUP(RC[-2],ss!R3C1:R1000C27,20,FALSE)"
ws2.Cells(irow, 4).FormulaR1C1 = "=VLOOKUP(RC[-3],'gp1'!R3C1:R1000C26,6,FALSE)"
End With
MyExcel.EnableEvents = True
ws2.Protect()
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace()
MyExcel.Quit()
ws2 = Nothing
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
Exit Sub
End Sub
Private Sub BtnAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAs.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws3 As Microsoft.Office.Interop.Excel.Worksheet
ws3 = wb.Sheets("advice salary")
ws3.Unprotect(123)
ws3.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws3
Dim irow As Long
irow = ws3.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws3.Range("A" & ws3.Rows.Count).End(XlDirection.xlUp).Row + 1
ws3.Cells(irow, 2).FormulaR1C1 = "=VLOOKUP(RC1,ss!R3C1:R1000C27,2,FALSE)"
ws3.Cells(irow, 3).FormulaR1C1 = "=VLOOKUP(RC1,'gp1'!R3C1:R1000C6,5,FALSE)"
ws3.Cells(irow, 4).FormulaR1C1 = "=VLOOKUP(RC1,'gp1'!R3C1:R1000C6,4,FALSE)"
ws3.Cells(irow, 5).FormulaR1C1 = "=VLOOKUP(RC1,ss!R3C1:R1000C27,27,FALSE)"
End With
MyExcel.EnableEvents = True
MyExcel.Visible = False
MyExcel.DisplayAlerts = False
MyExcel.Save("D:\azeo")
ws3.Protect(123)
MyExcel.Quit()
ws3 = Nothing
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
Exit Sub
Me.Update()
Exit Sub
End Sub
Private Sub BtnGpf_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGpf.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws4 As Microsoft.Office.Interop.Excel.Worksheet
ws4 = wb.Sheets("GPF Schedule ")
ws4.Unprotect(123)
ws4.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws4
Dim irow As Long
irow = ws4.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws4.Range("A" & ws4.Rows.Count).End(XlDirection.xlUp).Row + 1
ws4.Cells(irow, 2).FormulaR1C1 = "=VLOOKUP(RC[-1],'GP1'!R3C1:R300C25,2,FALSE)"
ws4.Cells(irow, 3).FormulaR1C1 = "=VLOOKUP(RC[-2],'GP1'!R3C1:R300C25,3,FALSE)"
ws4.Cells(irow, 4).FormulaR1C1 = "=VLOOKUP(RC[-3],'GP1'!R3C1:R300C25,15,FALSE)"
ws4.Cells(irow, 5).FormulaR1C1 = "=VLOOKUP(RC[-4],'GP1'!R3C1:R300C25,16,FALSE)"
ws4.Cells(irow, 6).FormulaR1C1 = "=(RC[-2]+RC[-1])"
End With
MyExcel.EnableEvents = True
MyExcel.Visible = False
MyExcel.DisplayAlerts = False
MyExcel.Save("D:\azeo")
ws4.Protect(123)
MyExcel.Quit()
ws4 = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
Exit Sub
Me.Update()
Exit Sub
End Sub
Private Sub BtnDLr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDLr.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws = wb.Sheets("gp1")
ws.Unprotect(123)
ws.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws
Dim irow As Long
irow = ws.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws.Range("A" & ws.Rows.Count).End(XlDirection.xlUp).Row
ws.UsedRange(irow).Value = ("")
ws.Cells(irow, 1).Value = ("")
ws.Cells(irow, 2).Value = ("")
ws.Cells(irow, 3).Value = ("")
ws.Cells(irow, 4).Value = ("")
ws.Cells(irow, 5).Value = ("")
ws.Cells(irow, 6).Value = ("")
ws.Cells(irow, 7).Value = ("")
Me.txtBp.Text = ws.Cells(irow, 7).Value
ws.Cells(irow, 8).Value = ("")
ws.Cells(irow, 9).Value = (ws.Cells(irow, 7).Value + ws.Cells(irow, 8).Value)
Me.Lbl_Tt.Text = ws.Cells(irow, 9).Value
ws.Cells(irow, 10).Value = ("")
ws.Cells(irow, 11).Value = Val(txtDac.Text) / 100 * (ws.Cells(irow, 7).Value)
Me.txtDa.Text = ws.Cells(irow, 11).Value
ws.Cells(irow, 12).Value = ("")
ws.Cells(irow, 13).Value = ("")
ws.Cells(irow, 14).Value = ("")
ws.Cells(irow, 15).Value = ("")
ws.Cells(irow, 16).Formula = (ws.Cells(irow, 9).Value + ws.Cells(irow, 10).Value + ws.Cells(irow, 11).Value + ws.Cells(irow, 12).Value + ws.Cells(irow, 13).Value + ws.Cells(irow, 14).Value + ws.Cells(irow, 15).Value)
Me.Lbl_Gt.Text = ws.Cells(irow, 16).Value
ws.Cells(irow, 17).Value = ("")
ws.Cells(irow, 18).Formula = (ws.Cells(irow, 16).Formula - ws.Cells(irow, 17).Value)
Me.Lbl_Naf.Text = ws.Cells(irow, 18).Value
ws.Cells(irow, 19).Value = ("")
ws.Cells(irow, 20).Value = ("")
ws.Cells(irow, 21).Value = ("")
ws.Cells(irow, 22).Value = ("")
ws.Cells(irow, 23).Value = ("")
ws.Cells(irow, 24) = (ws.Cells(irow, 19).Value + ws.Cells(irow, 20).Value + ws.Cells(irow, 21).Value + ws.Cells(irow, 22).Value + ws.Cells(irow, 23).Value)
Me.Lbl_Ts.Text = ws.Cells(irow, 24).Value
ws.Cells(irow, 25).Formula = (ws.Cells(irow, 18).Value - ws.Cells(irow, 24).Value)
Me.Lbl_Nad.Text = ws.Cells(irow, 25).Value
ws.Cells(irow, 26).Value = ""
ws.Cells(irow, 27).Value = ("")
ws.Cells(irow, 28).Value = ("")
ws.Cells(irow, 29).Value = ("")
ws.Cells(irow, 30).Value = ("")
ws.Cells(irow, 31).Formula = (ws.Cells(irow, 25).Value - (ws.Cells(irow, 26).Value + ws.Cells(irow, 27).Value + ws.Cells(irow, 28).Value + ws.Cells(irow, 29).Value + ws.Cells(irow, 30).Value))
Me.Lbl_Np.Text = ws.Cells(irow, 31).Value
MessageBox.Show("The last row in Col A of Sheet1 which has data is " & irow)
MyExcel.EnableEvents = True
MyExcel.Visible = False
ws.Protect(123)
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace()
End With
wb.Close()
MyExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(ws)
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb)
System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel)
ws = Nothing
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
Exit Sub
End Sub
Private Sub BtnCl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCl.Click
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws = wb.Sheets("gp1")
ws.Unprotect(123)
ws.Select()
MyExcel.Visible = True
MyExcel.UserControl = True
With ws
Dim irow As Long
irow = ws.Range("A65536").End(XlDirection.xlUp).Offset(1, 0).Select
irow = ws.Range("A" & ws.Rows.Count).End(XlDirection.xlUp).Row
ws.UsedRange(irow).Value = ("")
ws.Cells(irow, 1).Value = ("")
ws.Cells(irow, 2).Value = ("")
ws.Cells(irow, 3).Value = ("")
ws.Cells(irow, 4).Value = ("")
ws.Cells(irow, 5).Value = ("")
ws.Cells(irow, 6).Value = ("")
ws.Cells(irow, 7).Value = ("")
Me.txtBp.Text = ws.Cells(irow, 7).Value
ws.Cells(irow, 8).Value = ("")
ws.Cells(irow, 9).Value = (ws.Cells(irow, 7).Value + ws.Cells(irow, 8).Value)
Me.Lbl_Tt.Text = ws.Cells(irow, 9).Value
ws.Cells(irow, 10).Value = ("")
ws.Cells(irow, 11).Value = Val(txtDac.Text) / 100 * (ws.Cells(irow, 7).Value)
Me.txtDa.Text = ws.Cells(irow, 11).Value
ws.Cells(irow, 12).Value = ("")
ws.Cells(irow, 13).Value = ("")
ws.Cells(irow, 14).Value = ("")
ws.Cells(irow, 15).Value = ("")
ws.Cells(irow, 16).Formula = (ws.Cells(irow, 9).Value + ws.Cells(irow, 10).Value + ws.Cells(irow, 11).Value + ws.Cells(irow, 12).Value + ws.Cells(irow, 13).Value + ws.Cells(irow, 14).Value + ws.Cells(irow, 15).Value)
Me.Lbl_Gt.Text = ws.Cells(irow, 16).Value
ws.Cells(irow, 17).Value = ("")
ws.Cells(irow, 18).Formula = (ws.Cells(irow, 16).Formula - ws.Cells(irow, 17).Value)
Me.Lbl_Naf.Text = ws.Cells(irow, 18).Value
ws.Cells(irow, 19).Value = ("")
ws.Cells(irow, 20).Value = ("")
ws.Cells(irow, 21).Value = ("")
ws.Cells(irow, 22).Value = ("")
ws.Cells(irow, 23).Value = ("")
ws.Cells(irow, 24) = (ws.Cells(irow, 19).Value + ws.Cells(irow, 20).Value + ws.Cells(irow, 21).Value + ws.Cells(irow, 22).Value + ws.Cells(irow, 23).Value)
Me.Lbl_Ts.Text = ws.Cells(irow, 24).Value
ws.Cells(irow, 25).Formula = (ws.Cells(irow, 18).Value - ws.Cells(irow, 24).Value)
Me.Lbl_Nad.Text = ws.Cells(irow, 25).Value
ws.Cells(irow, 26).Value = ""
ws.Cells(irow, 27).Value = ("")
ws.Cells(irow, 28).Value = ("")
ws.Cells(irow, 29).Value = ("")
ws.Cells(irow, 30).Value = ("")
ws.Cells(irow, 31).Formula = (ws.Cells(irow, 25).Value - (ws.Cells(irow, 26).Value + ws.Cells(irow, 27).Value + ws.Cells(irow, 28).Value + ws.Cells(irow, 29).Value + ws.Cells(irow, 30).Value))
Me.Lbl_Np.Text = ws.Cells(irow, 31).Value
MessageBox.Show("The last row in Col A of Sheet1 which has data is " & irow)
MyExcel.EnableEvents = True
MyExcel.Visible = False
ws.Protect(123)
MyExcel.DisplayAlerts = False
MyExcel.SaveWorkspace()
End With
wb.Close()
MyExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(ws)
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb)
System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel)
ws = Nothing
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
Exit Sub
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Activate()
Dim MyExcel As Microsoft.Office.Interop.Excel.Application
MyExcel = New Microsoft.Office.Interop.Excel.Application
MyExcel.Visible = True
MyExcel.UserControl = True
MyExcel.EnableEvents = False
Dim wb As Microsoft.Office.Interop.Excel.Workbook
wb = MyExcel.Workbooks.Open("D:\azeo")
MsgBox("Excel connected")
wb.Close()
MyExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb)
System.Runtime.InteropServices.Marshal.ReleaseComObject(MyExcel)
wb = Nothing
MyExcel = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
End Class
Friday, February 15, 2013 4:16 PM
On which line of code does the error occur? The error is indicating that the index being referenced in the Sheets collection does not exist. I would verify that the Sheet names you are referencing are spelled correctly. For example:
ws4 = wb.Sheets("GPF Schedule ")
Could the extra space be causing a problem?
Paul ~~~~ Microsoft MVP (Visual Basic)
Friday, February 15, 2013 4:27 PM
OH!
I once thought about that but since i had copy pasted the sheet names i never checked it but now i think it can be the case .Let me check and i will come back
Thanks with regards
Friday, February 15, 2013 5:01 PM
No i checked and yes folder name azeo was capital i changed it but still same issue.Had it been the wrong name of space then it would not work even on host i mean my system.It is working fine on my system.e.g if i spell wrongly the file and its address wont be accesiable even on my system during debug.
Can this be problem .The local disk D is name as Local Disk(D:) ON MY SYSTEM AND I AM GIVING SIMPLY ADRESS D .BUT AGAIN IT WORKS ON MY SYSTEM.bUT ONE THING IS SURE WHEN I CLICK ANY OF THE BUTTONS IT DOES OPEN Excel but not the correct file .And one thing i dont understand The file expected to be opened is on drive d namely azeo .why does it open excel and give it a sheet name azeo .
Friday, February 15, 2013 5:34 PM
"Here is a source code"
There is no such thing as 'a source code'. It's always 'source code'.
Renee
"MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me
Friday, February 15, 2013 5:40 PM
On the working system, change this line of code to this:
ws4 = wb.Sheets("GPF Schedule ")
to this:
ws4 = wb.Sheets("GPF Schedule1 ")
See what happens.
Renee
"MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me
Friday, February 15, 2013 5:55 PM
Hello Renee Culver !
Thanks for participation !
Yes , i am sorry if grammatical mistakes are bothering you.But here i give more stress on mistakes in Code.Although , i am very much serious about those things but i when we are online we can take liberty of write "u" instead of "You".This is also a grammatical role .
Here is the result of your enquiry!
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
But the problem here is not weather it is the same thing i am experiencing on another computer .This proves that there is no bad index problem THat is why it does not show error on my computer.THe problem is it is showing the error on another computer.And IT recognised the file and then instead of opening it .It opens excel simply and gives file name i.e azeo to a sheet in that excel workbook.
Friday, February 15, 2013 6:13 PM
I see that you used "D:\azeo" as the filename. Is that really the filename, or is it "D:\azeo.xlsx"?
Also, have you tried setting your program to be compiled for the x86 platform?
--
Andrew
Friday, February 15, 2013 6:24 PM
Thanks Andrew!
No it is what you say "D:\azeo.xlsx",How can i set my programme to be compiled in x86,I think i have tried that one option.But i still want to know from you.
Thanks again this one is really a mistake .But i thought it wont matter .I will try it and let you know .This time the other computer is not with me and it is 12 a.m here
Friday, February 15, 2013 7:01 PM
How can i set my programme to be compiled in x86
Which version and edition of Visual Studio are you using (e.g. VS2012 Professional)? You can easily find the answer by searching on google or bing.
--
Andrew
Friday, February 15, 2013 8:53 PM
And the error occurs on which line of code? I asked this before but did not get an answer.
Paul ~~~~ Microsoft MVP (Visual Basic)
Saturday, February 16, 2013 2:34 AM
Morning Paul!
I have already answered that please check my comments after that.Now this seems to be a reasonable one and it is same as you had pointed out .you said about a sheet name i had checked and answered accordingly .Sheet names were correct .Andrew said about file name .and i think he is right i have not written extenction with file name.I have changed the same and will let you know about it.
Thanks to All who participated
Saturday, February 16, 2013 3:04 AM
Thanks Andrew and Paul
Both of you have helped in soloving half of the problem Both of you spotted the error even though Andrew was more specific .The problem is in extention of file name which i many times thought i should give but i didnt .And at last that was the problem that on other system it was not working .
But this is just 60% of problem another 40% is that
1.If i close excel before it is supposed to be closed through code calling close command it throughs an exception
2. Another big problem is it dosent show button text instead it shows some mathmatical shapes instead of button text.
Thanks you have relieved me a lot.
In real Life one can commit little mistakes but in programming one has to pay a big price for that.
Saturday, February 16, 2013 3:11 AM
<iframe src="https://skydrive.live.com/embed?cid=6A8D018D5E365DB4&resid=6A8D018D5E365DB4%21137&authkey=ADD5_fcazJ-zrBM" width="318" height="179" frameborder="0" scrolling="no"></iframe>
I am not able to upload here the screen shot of form if possible please send me email or the embedded code of screen shot is above.
Thanks
Monday, February 18, 2013 9:33 AM
I soloved one biggest problem here that was button text showing images instead of text .No one here could get this soloved.Although at last both of my problems were so simple.One Andrew got sorted out and another one i soloved myself.
IT was just a problem of text rendering.
In the properties window i selected textrendring option to true and problem got soloved.
Now I have other issues popping up
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A03EC): Cannot access 'RESUME.XLW'.
at Microsoft.Office.Interop.Excel.ApplicationClass.SaveWorkspace(Object Filename)
at EducountSoftware.Form1.BtnSsc_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dllEducountSoftware
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Muzamil/AppData/Local/Apps/2.0/PTWHY9XD.PD7/5G2HWVV3.CL7/educ..tion_0000000000000000_0001.0000_12336d4a16422dce/EducountSoftware.exeMicrosoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dllSystem
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dllSystem.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dllSystem.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1002 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dllSystem.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dllSystem.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dllMicrosoft.Office.Interop.Excel
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4756.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Excel/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dlloffice
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4760.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/14.0.0.0__71e9bce111e9429c/office.dll************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.2.advice salary
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A03EC): Cannot access 'RESUME.XLW'.
at Microsoft.Office.Interop.Excel.ApplicationClass.Save(Object Filename)
at EducountSoftware.Form1.BtnAs_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dllEducountSoftware
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Muzamil/AppData/Local/Apps/2.0/PTWHY9XD.PD7/5G2HWVV3.CL7/educ..tion_0000000000000000_0001.0000_12336d4a16422dce/EducountSoftware.exeMicrosoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dllSystem
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dllSystem.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dllSystem.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1002 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dllSystem.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dllSystem.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dllMicrosoft.Office.Interop.Excel
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4756.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Excel/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dlloffice
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4760.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/14.0.0.0__71e9bce111e9429c/office.dll************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.clear form
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A03EC): Cannot access 'RESUME.XLW'.
at Microsoft.Office.Interop.Excel.ApplicationClass.SaveWorkspace(Object Filename)
at EducountSoftware.Form1.BtnCl_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dllEducountSoftware
Assembly Version: 1.0.0.0
Win32 Version: 1delete record
ee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A03EC): Cannot access 'RESUME.XLW'.
at Microsoft.Office.Interop.Excel.ApplicationClass.SaveWorkspace(Object Filename)
at EducountSoftware.Form1.Button2_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dllEducountSoftware
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Muzamil/AppData/Local/Apps/2.0/PTWHY9XD.PD7/5G2HWVV3.CL7/educ..tion_0000000000000000_0001.0000_12336d4a16422dce/EducountSoftware.exeMicrosoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dllSystem
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dllSystem.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dllSystem.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1002 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dllSystem.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dllSystem.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dllMicrosoft.Office.Interop.Excel
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4756.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Excel/14.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dlloffice
Assembly Version: 14.0.0.0
Win32 Version: 14.0.4760.1000
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/14.0.0.0__71e9bce111e9429c/office.dll************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Monday, February 18, 2013 10:34 AM
Masoodi,
You have asked a new question in this thread now that you have found an answer to your question.
This is not how these forums work.
Please post your solution, mark it as answer, and ask your new question in a new thread.
Thank you, take care.
“If you want something you've never had, you need to do something you've never done.”
Don't forget to mark helpful posts and answers ! Answer an interesting question? Write a new article about it! My Articles |
*This post does not reflect the opinion of Microsoft, or its employees.
Monday, February 18, 2013 11:11 AM
HI Paul!
The problem is still same.Jit debugger and com exception.Although with different faces.Please check my first post and last post you will find them same.
Thanks with regards