Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/10/2011, 00:58
danielico3
 
Fecha de Ingreso: abril-2008
Ubicación: España
Mensajes: 58
Antigüedad: 16 años
Puntos: 1
Respuesta: Excel - Modificar hipervinculos de todas las celdas-

He encontrado este codigo en la pagina de microsoft, pero solo me modifica la primera fila de la hoja de excel:

************************************************** ******
Sub HyperLinkChange()
Dim oldtext As String
Dim newtext As String
Dim h As Hyperlink

' These can be any text portion of a hyperlink, such as ".com" or ".org".
oldtext = "http://192.168.10.xx/antiguo/consulta_celda.php?/"
newtext = "http://192.168.100.xxx/nuevo/consulta_celda.php?/"

' Check all hyperlinks on active sheet.
For Each h In ActiveSheet.Hyperlinks
x = InStr(1, h.Address, oldtext)
If x > 0 Then
If h.TextToDisplay = h.Address Then
h.TextToDisplay = newtext
End If
h.Address = Application.WorksheetFunction. _
Substitute(h.Address, oldtext, newtext)
End If
Next
End Sub
************************************************** *******

Alguien sabe acomo retocarlo para que me modifique todas las celdas del documento????'

GRACIAS