http://www.megaupload.com/?d=7DEU6WFUSub controllo_SCORTA()
' la colonna C è il nome dell'articolo sotto scorta '
Dim CL As Object
Set zona = Sheets("magazzino").Range(Cells(6, 9), Cells(6, 9).End(xlDown))
For Each CL In zona
If CL.Value = 0 Then
DescArt = CL.Offset(0, -6).Value
CodArt = CL.Offset(0, -7).Value
NomeForn = CL.Offset(0, -8).Value
CL.Select
MsgBox "L'ARTICOLO:" & DescArt & " COD.:" & CodArt & " DEL FORNITORE: " & NomeForn & " SCORTA FINITA, MAGAZZINO VUOTO"
ElseIf CL.Value = CL.Offset(0, 6).Value Then
DescArt = CL.Offset(0, -6).Value
CodArt = CL.Offset(0, -7).Value
NomeForn = CL.Offset(0, -8).Value
CL.Select
MsgBox "L'ARTICOLO:" & DescArt & " COD.: " & CodArt & " DEL FORNITORE: " & NomeForn & " E' AL MINIMO di SCORTA"
ElseIf CL.Value < CL.Offset(0, 6).Value Then
DescArt = CL.Offset(0, -6).Value
CodArt = CL.Offset(0, -7).Value
NomeForn = CL.Offset(0, -8).Value
CL.Select
MsgBox "L'ARTICOLO:" & DescArt & " COD.: " & CodArt & " DEL FORNITORE: " & NomeForn & " E' SOTTO SCORTA"
Dim idomanda As Integer
idomanda = MsgBox("VUOI INSERIRE L'ARTICOLO:" & DescArt & " COD.: " & CodArt & " DEL FORNITORE: " & NomeForn & " NEL BUONO ORDINE?", vbYesNo)
If idomanda = vbYes Then
Sheets("magazzino").Range(Cells(6, 9), Cells(6, 9).End(xlDown)).Copy Destination:=Sheets("buono ordine").Range("a" & Rows.Count).End(xlUp).Offset(1, 0)
If idomanda = vbNo Then: Exit Sub
Exit Sub
End If
End If
10:
Next
MsgBox "Articolo Non inserito in buono ordine"
End Sub
la macro mi da un errore che nn riesco a trovare : non mi riporta nella pagina Buono Ordine la riga riferita all'articolo sotto scorta, nel momento in cui clicco yes sul msgbox ( "vuoi inserire l'articolo .... nel buno ordine ?" )
puoi aiutarmi a risolverlo ?
grazie