prova in questo modo
- Codice: Seleziona tutto
Risp = MsgBox("Il foglio deve essere inserito nelle 'Presenze' ?", vbYesNo)
If Risp = 6 Then ' 6 = YES
' qui metti il codice che inserisce il nome in Presenze
End If
Si deve definire "Risp" come Integer
Moderatori: Anthony47, Flash30005
Risp = MsgBox("Il foglio deve essere inserito nelle 'Presenze' ?", vbYesNo)
If Risp = 6 Then ' 6 = YES
' qui metti il codice che inserisce il nome in Presenze
End If
Public Sub InserisciPresenze()
Dim v As Variant
Dim Index As Integer
Dim Colonna As Variant
Dim Risp As Integer
Risp = MsgBox("VUOI INSERIRE I PRESENTI E GLI ASSENTI? ", vbYesNo)
If Risp = 6 Then
For Colonna = "2" To "5"
For Index = 3 To 50
v = Cells(Index, "A")
If v = "" Then
Else
Risp = MsgBox(v & " era presente?", vbYesNo)
If Risp = 6 Then
Cells(Index, Colonna) = "SI"
Else
Cells(Index, Colonna) = "NO"
End If
End If
Next
Next
End If
End Sub
Public Sub InserisciPresenze()
Dim v As Variant
Dim Index As Integer
Dim Colonna As Variant
Dim Risp As Integer
Risp = MsgBox("VUOI INSERIRE I PRESENTI E GLI ASSENTI? ", vbYesNo)
If Risp = 6 Then
For Colonna = "2" To "2"
For Index = 3 To 100
v = Cells(Index, "A")
If v = "" Then
Else
If Cells(Index, Colonna) = "" Then
Risp = MsgBox(v & " era presente?", vbYesNo)
If Risp = 6 Then
Cells(Index, Colonna) = "SI"
Else
Cells(Index, Colonna) = "NO"
End If
Else: Colonna = Colonna + 1
Index = Index - 1
End If
End If
Next
Next
End If
End Sub
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 5 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Gianca532011 e 37 ospiti