Salve mi potete commentare un programma in visual basic express poichè non so cosa fà inquanto mi è stato inviato vi ringranzio infinitamente.
Imports Microsoft.Office.Core


Public Class Form1
Dim s As Object
Dim objExcel As Object
Dim objWorkbook As Object
Dim objWorksheet As Object

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i, l, t, n, h As Double
Dim b1, b2, w As Double
Dim psi(5, 5, 7)
Dim appoggio, integrale, parte_intera, prova As Double 'variabili per il calcolo integrale
Dim s As Double
Dim objExcel As Object
Dim objWorkbook As Object
Dim objWorksheet As Object
t = Integer.Parse(TextBox6.Text) 'livello del file excel
n = Integer.Parse(TextBox1.Text) 'numero di intervalli del calcolo integrale

If t > 11533 Or t < 0 Then
Label4.Visible = True
Label4.Text = "Attenzione: il valore deve essere compreso nell'intervallo indicato"
Else

Label4.Visible = False
w = b1 = b2 = 0 'inizializzazione variabili
objExcel = CreateObject("Excel.Application")
objWorkbook = objExcel.Workbooks.Open(Application.StartupPath & "\calabro.xlsx")
objWorksheet = objWorkbook.WorkSheets("3030")

objExcel.Visible = True
'ListBox2.Items.Add(objWorksheet.cells(2, 2).Value)
s = objWorksheet.cells(2, 2).value

h = t / n

For i = 1 To 5 'ciclo di w

For j = 1 To 5 'ciclo di b1

For k = 1 To 7 'ciclo di b2

For l = 2 To t 'ciclo di t

s = objWorksheet.cells(2, l).value
psi(i, j, k) = (w * b1) * (1 / Math.Exp(b1 * s)) + (1 - w) * b2 * (1 / Math.Exp(b2 * s))
ListBox1.Items.Add(psi(i, j, k))
b2 = b2 + 50
integrale = 0

For m = 2 To (n - 1) 'ciclo del calcolo integrale
prova = t - 2
appoggio = (prova + (n * prova * m)) / (2 * m)
parte_intera = Int(appoggio)
integrale = integrale + (h * appoggio) * psi(i, j, k)
ListBox2.Items.Add(integrale)
Next m



Next l

Next k
b1 = b1 + 5

Next j
w = w + 0.25

Next i
objExcel.Quit()
objExcel = Nothing
End If
End Sub

Private Function xlWorkSheet() As Object
Throw New NotImplementedException
End Function



Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim n As Integer
n = Integer.Parse(TextBox1.Text)
If n > 100 Then

Label5.Visible = True
Else
Label5.Visible = False

End If
End Sub

Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged

Dim intCheck As Integer
intCheck = Integer.Parse(TextBox6.Text)

If intCheck > 32760 Then
Label4.Visible = True
Label4.Text = "Attenzione: inserire un intero minore di 32760."
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class