Visual Basic para Aplicaciones - Como puedo captar el boton del tabulador en una ho

Life is soft - evento anual de software empresarial
 
Vista:

Como puedo captar el boton del tabulador en una ho

Publicado por terb (2 intervenciones) el 04/07/2003 22:55:03
Como puedo captar el boton del tabulador en una hoja de excel, o sea como puedo hacer que al escribir 340 en una cel·la de excel i darle al tabulador me salga en la cel·la de al lado escrito "cuenta de clientes"
He hecho este codigo pero no me lo escribe al lado:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If ActiveCell.Column = 2 Then
If Val(Target) <> 0 Then
If Target = 340 Then 'si el compte es el 340 de clients
'Range(ActiveCell.Column + 1, ActiveCell.Row).Value = "Compte de clients"
Hoja1.Cells(ActiveCell.Column + 1, ActiveCell.Row) = "Compte de clients"
MsgBox "estoy" & " " & Target & Chr(13) & CInt(Target)
End If
End If
End If
End Sub

Muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Como puedo captar el boton del tabulador en una

Publicado por J.Fernando (39 intervenciones) el 07/07/2003 17:32:15
Esto te puede ayudar:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If ActiveCell.Offset(0, -1).Value = 340 Then
ActiveCell = "Mi Texto"
End If
End Sub

Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar