Ver Mensaje Individual
  #5 (permalink)  
Antiguo 07/09/2013, 10:15
plambreton
 
Fecha de Ingreso: agosto-2013
Ubicación: Mexico
Mensajes: 12
Antigüedad: 11 años, 6 meses
Puntos: 0
Respuesta: macro para actualizar precio alto

Gracias por tu apoyo, sabes que ya lo probe y cuando doy enter despues de agregar el precio en la columna 10, me aparece una ventana de excel con el siguiente error:
Error de compilacion
Nombre ambiguo detectado:
Worksheet_Change

no se si sea por que en esa misma hoja tengo la siguiente macro para que al poner este mismo precio actualice la fecha de actualizacion del precio

Private Sub Worksheet_Change(ByVal Target As Range)
tiempo = Date
Set isect = Application.Intersect(Target, Range("j2:j10000"))
If Not isect Is Nothing Then
If isect.Value <> "" Then
isect.Offset(0, 1).Value = tiempo
End If
Set isect = Application.Intersect(Target, Range("j2: j10000 "))
If Not isect Is Nothing Then
If isect.Value = "" Then
isect.Offset(0, 1).Value = ""
End If
End If
End If
End Sub


Gracias por tu apoyo



Cita:
Iniciado por Rick001 Ver Mensaje
saludos:

prueba este codigo en la hoja.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 10 Then 'donde 10 es el numero de columna

Columns("L:N").Select
Selection.EntireColumn.Hidden = False
ActiveWindow.SmallScroll ToRight:=13
Columns("Y:AA").Select
Selection.EntireColumn.Hidden = False
ActiveWindow.SmallScroll ToRight:=-11
Columns("M:M").Select
Selection.Copy
ActiveWindow.SmallScroll ToRight:=7
Range("Z1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll ToRight:=-15
Columns("M:M").Select
Selection.EntireColumn.Hidden = True
Range("J2").Select

End Sub

suerte