Jump to content
Milton Cordova

Ingresar S / N doble clic celda

Recommended Posts

Saludos lo que necesito es al dar doble clic en la celda A7 me ingrese la "S" al dar otra vez doble clic se elimine la S y se ingrese la "N".

adjunto una macro que estoy intentando pero no da resultado

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

If Not Intersect(Target, Range("A7")) Is Nothing Then
Target = IIf(Target = "N", "", "S")
Target.Offset(1, 0).Select
End If
End Sub


Gracias

Share this post


Link to post
Share on other sites

Hola Milton

Gusto en Saludarte.

Podrías intentar así:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A7")) Is Nothing Then
Target = IIf(Target = "", "S", "N")
Target.Offset(1, 0).Activate
End If
End Sub
 
Quedo a tus ordenes.
Nos Comentas por favor.
Saludos.

Share this post


Link to post
Share on other sites

Si la celda requerida es A1:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$A$1" Then
   Target = IIf(Target = "S", "N", "S")
   Target.Offset(1).Select
End If
End Sub

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.



×
×
  • Create New...

Important Information

Privacy Policy


CTA Templates.png