Me podrías compartir el código estoy realizando un proyecto para mi institución votos de personeros te agradezco

Proyecto en excel para votaciones con estudiantes para elegir personeros

1 Respuesta

Respuesta

Te comparto este código espero y te sirva amigo

Private Sub CommandButton1_Click()
If OptionButton1.Value = True Then
Sheets("GRACIAS").Select
Range("D5").Value = Range("D5").Value + 1
Sheets("Hoja1").Select

MsgBox prompt:="GRACIAS POR TU VOTO", Buttons:=vbOKOnly, Title:="VOTO EXITO"
Unload Me
'ActiveWorkbook.Close SaveChanges:=False
Application.Visible = True
End If
If OptionButton2.Value = True Then
Sheets("GRACIAS").Select
Range("E5").Value = Range("E5").Value + 1
Sheets("Hoja1").Select

MsgBox prompt:="GRACIAS POR TU VOTO", Buttons:=vbOKOnly, Title:="VOTO EXITO"
Unload Me
'ActiveWorkbook.Close SaveChanges:=False
Application.Visible = True
End If
If OptionButton3.Value = True Then
Sheets("GRACIAS").Select
Range("F5").Value = Range("F5").Value + 1
Sheets("Hoja1").Select

MsgBox prompt:="GRACIAS POR TU VOTO", Buttons:=vbOKOnly, Title:="VOTO EXITO"
Unload Me
'ActiveWorkbook.Close SaveChanges:=False
Application.Visible = True
End If
If OptionButton4.Value = True Then
Sheets("GRACIAS").Select
Range("G5").Value = Range("G5").Value + 1
Sheets("Hoja1").Select

MsgBox prompt:="GRACIAS POR TU VOTO", Buttons:=vbOKOnly, Title:="VOTO EXITO"
Unload Me
'ActiveWorkbook.Close SaveChanges:=False
Application.Visible = True
End If

End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas