Private Sub CommandButton2_Click()
a = OptionButton1.Value
b = OptionButton2.Value
If a = False And b = False Then
MsgBox "DEVI SELEZIONARE IL TIPO DI ETICHETTA"
Exit Sub
End If
If TextBox2 = "" Or TextBox3 = "" Or TextBox5 = "" Then
MsgBox "MANCANO DATI ARTICOLO"
Exit Sub
End If
If interruttore = True Then
MsgBox "DATI NUOVO ARTICOLO NON REGISTRATI - REGISTRARLI"
Exit Sub
End If
If OptionButton2.Value = True Then
Sheets("Etichette").Select
codice = TextBox3
If codice = "" Then Exit Sub
Set Intervallo = Range("A1:I35")
If Application.CountIf(Intervallo, codice) = 0 Then
codice = Array("B3", "G3", "B12", "G12", "B21", "G21", "B30", "G30")
barre = Array("C1", "H1", "C10", "H10", "C19", "H19", "c28", "H28")
For M = LBound(codice) To UBound(codice)
If Range(codice(M)) = "" Then
Range(codice(M)) = TextBox3
Range(codice(M)).Offset(2, -1) = TextBox2 'descriz articolo
Range(codice(M)).Offset(4, 0) = CDbl(TextBox5) 'prezzo
Range(barre(M)) = FF_EAN13(TextBox4) 'a barre
Range(codice(M)).Offset(0, -1) = "Cod."
Range(codice(M)).Offset(4, -1) = "€"
Range(codice(M)).Offset(4, 1) = "IVA ESCLUSA"
(Qui vorrei far inserire l'immagine
Range(codice(M)).Offset(2, -1) =LoadPicture ("C:Documents and SettingsUserDocumentiImmaginiBranc.JPG")
Exit For
End If
|