Torna al Thread

Private Sub AvviaVerificaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AvviaVerificaToolStripMenuItem.Click Dim appExcel As New Microsoft.Office.Interop.Excel.Application appExcel.Visible = False Dim WB As Microsoft.Office.Interop.Excel.Workbook = appExcel.Workbooks.Open("\\Server\file.xls") Dim WS As Microsoft.Office.Interop.Excel.Worksheet = WB.Worksheets("Foglio1") Dim messaggio As String Dim scadenze(37, 1) Dim valore As Date Dim oggi As Date oggi = Now() messaggio = WB.Name MsgBox(messaggio) scadenze = WS.Range("A2:A38").Value For Each valore In scadenze If valore > oggi Then MsgBox("ok " & valore) End If Next WB.Close() appExcel.Quit() appExcel = Nothing End Sub
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5