modificar comentario segun el valor de la celda
Publicado por pedro garcia rivera (47 intervenciones) el 12/07/2011 04:50:00
Alguien pe podria ayudar a corregir la macro.
ya que esta en el office 2010 funciona pero en el 2000 y 2003 no podrian ayudarme les agradeseria mucho
Dim Cell As Range
Dim TextoAnt As String, NuevoTexto As String
If Target.Column < 8 And Target.Column > 39 Then Exit Sub
If ActiveCell = "Auditoria" Then
Unload UserForm2
UserForm2.Show
Exit Sub
End If
If ActiveCell = "" Then
Exit Sub
End If
If ActiveCell = "Asignado" Then
For Each Cell In Target
With Cell
On Error Resume Next
Load UserForm1
UserForm1.Show
Dim texto As String
texto = Range("b1").Value
TextoAnt = .Comment.Text
If Err <> 0 Then .AddComment
NuevoTexto = TextoAnt & Cell.Text & _
" a: " & texto & " el " & Now & vbLf
.Comment.Text NuevoTexto
.Comment.Visible = True
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
Next Cell
Unload UserForm1
Exit Sub
End If
If ActiveCell = "Tultitlan" Or ActiveCell = "Vallejo" Or ActiveCell = "T y V" Then
For Each Cell In Target
With Cell
On Error Resume Next
Dim texto2 As String
texto2 = Range("c1").Value
TextoAnt = .Comment.Text
If Err <> 0 Then .AddComment
NuevoTexto = TextoAnt & Cell.Text & _
" " & texto2 & " el " & Now & vbLf
.Comment.Text NuevoTexto
.Comment.Visible = True
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
Next Cell
Exit Sub
End If
ya que esta en el office 2010 funciona pero en el 2000 y 2003 no podrian ayudarme les agradeseria mucho
Dim Cell As Range
Dim TextoAnt As String, NuevoTexto As String
If Target.Column < 8 And Target.Column > 39 Then Exit Sub
If ActiveCell = "Auditoria" Then
Unload UserForm2
UserForm2.Show
Exit Sub
End If
If ActiveCell = "" Then
Exit Sub
End If
If ActiveCell = "Asignado" Then
For Each Cell In Target
With Cell
On Error Resume Next
Load UserForm1
UserForm1.Show
Dim texto As String
texto = Range("b1").Value
TextoAnt = .Comment.Text
If Err <> 0 Then .AddComment
NuevoTexto = TextoAnt & Cell.Text & _
" a: " & texto & " el " & Now & vbLf
.Comment.Text NuevoTexto
.Comment.Visible = True
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
Next Cell
Unload UserForm1
Exit Sub
End If
If ActiveCell = "Tultitlan" Or ActiveCell = "Vallejo" Or ActiveCell = "T y V" Then
For Each Cell In Target
With Cell
On Error Resume Next
Dim texto2 As String
texto2 = Range("c1").Value
TextoAnt = .Comment.Text
If Err <> 0 Then .AddComment
NuevoTexto = TextoAnt & Cell.Text & _
" " & texto2 & " el " & Now & vbLf
.Comment.Text NuevoTexto
.Comment.Visible = True
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
Next Cell
Exit Sub
End If
Valora esta pregunta


0