
Private Sub CmdRicerca_Click()
If Not ComboBox1.Value = "" Then
Dim no_ligne As Integer
no_ligne = ComboBox1.ListIndex + 6
codlav.Value = Cells(no_ligne, 1).Value
'ordine1.Value = Cells(no_ligne, 2).Value
Cant.Value = Cells(no_ligne, 3).Value
via.Value = Cells(no_ligne, 4).Value
importo.Value = Cells(no_ligne, 5).Value
importo = Format(importo, "€ #,##0.00")
P1.Value = Cells(no_ligne, 6).Value
P1 = Format(P1, "€ #,##0.00")
P2.Value = Cells(no_ligne, 7).Value
P2 = Format(P2, "€ #,##0.00")
P3.Value = Cells(no_ligne, 8).Value
P3 = Format(P3, "€ #,##0.00")
P4.Value = Cells(no_ligne, 9).Value
P4 = Format(P4, "€ #,##0.00")
PF.Value = Cells(no_ligne, 10).Value
PF = Format(PF, "€ #,##0.00")
Else
End If
End Sub
Private Sub CmdModifica_Click()
Dim no_ligne As Integer
Sheets("TABCANT").Select
no_ligne = ComboBox1.ListIndex + 6
Cells(no_ligne, 1) = codlav.Value
'Cells(no_ligne, 2) = ordine1.Value
Cells(no_ligne, 3) = Cant.Value
Cells(no_ligne, 4) = via.Value
' Cells(no_ligne, 5) = importo.Value
Cells(no_ligne, 6) = P1.Value
Cells(no_ligne, 7) = P2.Value
Cells(no_ligne, 8) = P3.Value
Cells(no_ligne, 9) = P4.Value
Cells(no_ligne, 10) = PF.Value
ComboBox1.Text = ""
codlav.Text = ""
Cant.Text = ""
via.Text = ""
importo.Text = ""
P1.Text = ""
P2.Text = ""
P3.Text = ""
P4.Text = ""
PF.Text = ""
codlav.SetFocus
CaricaDati
End Sub
|
Cells(no_ligne, 6) = Format(P1.Value)
Cells(no_ligne, 7) = Format(P2.Value)
Cells(no_ligne, 8) = Format(P3.Value)
Cells(no_ligne, 9) = Format(P4.Value)
Cells(no_ligne, 10) = Format(PF.Value)
|
Private Sub CommandButton4_Click()
Dim no_ligne As Integer
If Not ComboBox1.Value = "" Then
no_ligne = ComboBox1.ListIndex + 6
codlav.Value = Cells(no_ligne, 1).Value
cantiere.Value = Cells(no_ligne, 3).Value
via.Value = Cells(no_ligne, 4).Value
importo = Format(Cells(no_ligne, 5).Value, "currency")
P1 = Format(Cells(no_ligne, 6).Value, "currency")
P2 = Format(Cells(no_ligne, 7), "currency")
P3 = Format(Cells(no_ligne, 8), "currency")
P4 = Format(Cells(no_ligne, 9), "currency")
PF = Format(Cells(no_ligne, 10), "currency")
Else
End If
End Sub
Private Sub CommandButton5_Click()
Dim no_ligne As Integer
Sheets("TABCANT").Select
no_ligne = ComboBox1.ListIndex + 6
Cells(no_ligne, 1) = codlav.Value
'Cells(no_ligne, 2) = ordine1.Value
Cells(no_ligne, 3) = cantiere.Value
Cells(no_ligne, 4) = via.Value
' Cells(no_ligne, 5) = importo.Value
On Error Resume Next
Cells(no_ligne, 6) = CDbl(Replace(P1, "€ ", ""))
Cells(no_ligne, 7) = CDbl(Replace(P2, "€ ", ""))
Cells(no_ligne, 8) = CDbl(Replace(P3, "€ ", ""))
Cells(no_ligne, 9) = CDbl(Replace(P4, "€ ", ""))
Cells(no_ligne, 10) = CDbl(Replace(PF, "€ ", ""))
On Error GoTo 0
|
