Si capisce ben poco da quello che hai scritto. il codice va scritto tra i relativi Tags CODE e /CODE
se vuoi farti capire.
Venedo al tuo problema l'errore è dovuto al fatto che la Sub ContoTAV ( se è una Sub) non accetta parametri perchè evidentementi non li hai dichiarati.
Ad esempio se scrivi:
codice:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TestSub(1000)
End Sub
Sub TestSub()
Dim valore As DateTime = DateTime.Now
End Sub
incorri nell'errore che hai sopra citato.
La sintassi corretta è:
codice:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TestSub(1000)
End Sub
Sub TestSub(ByVal intervallo As Double)
Dim valore As DateTime = DateTime.Now
valore = valore - TimeSpan.FromSeconds(intervallo)
End Sub