Hi to all.
in the attached macro:

if you answer YES (If OutPut = 1 Then)
in the last line
'ultimariga = Worksheets ("ordinare"). Cells (Rows.Count, "A"). End (xlUp) .row
cell H enter YES

if you answer NO
'ultimariga = Worksheets ("ordinare"). Cells (Rows.Count, "A"). End (xlUp) .row
cell H enter NO

 'Dim avviso As String
    Dim OutPut As Integer
    Dim ultimariga As Range
    Dim myrange As Range
    Dim row As Integer



    
        OutPut = MsgBox("Sign. < " & Environ("UserName") & " > " & Chr(13) & _
        "il codice selezionato è in esaurimento,vuoi ordinare?.", vbExclamation + vbOKCancel, "AVVISO!")


       If OutPut = 1 Then
                                                    
                     
         'Worksheets("ordinare").select  
         'Worksheets("ordinare").unProtect "123456"       
                    
         'ultimariga = Worksheets("ordinare").Cells(Rows.Count, "A").End(xlUp).row
         'Worksheets("ordinare").Range(Cells(ultimariga, 1), Cells(ultimariga, 6)).Interior.ColorIndex = 3  '<<< change in YES cell/H

         'Worksheets("ordinare").Protect "123456"         
         'Worksheets("articoli").select 
         
         Call Mail_thunderbird
         'Call Mail_outlook        
            

                       
    Else  
       


         'Worksheets("ordinare").select  
         'Worksheets("ordinare").unProtect "123456"       
                    
         'ultimariga = Worksheets("ordinare").Cells(Rows.Count, "A").End(xlUp).row
         'Worksheets("ordinare").Range(Cells(ultimariga, 1), Cells(ultimariga, 6)).Interior.ColorIndex = 3  '<<< change in NO cell/H

         'Worksheets("ordinare").Protect "123456"         
         'Worksheets("articoli").select          
       
               
    End If
xam