Revision de codigo
Hola Buenos Días, mi problema es con un fragmento de código que no funciona, es en la ultima parte que me sale un error, gracias por tu ayuda.Sub CambiarInfinal()
Dim nombre, ruta, temporal, utilrutavieja As String, largo, fin As
Integer
Workbooks.Open Application.GetOpenFilename("Libros de Excel (*.xls),
*.xls")
nombre = "[" & ActiveWorkbook.Name & "]"
ruta = "'" & ActiveWorkbook.Path & "\"
ActiveWorkbook.Close False
Range("B4:C5,B8:C8,B11:C18,B21:C21,B4:C5,B8:C8,B11:C18,B21:C21,B32:C34,B36:C
41,B43:C43").Select
For Each Cell In Selection
temporal = Cell.Formula
fin = WorksheetFunction.Search("]", temporal) + 1
largo = Len(temporal)
utilrutavieja = "'" & Mid(temporal, fin, largo - fin)
temporal = "=" & ruta & nombre & utilrutavieja
Cell.Formula = temporal ' ¡¡¡¡¡¡NO PASA DE ESTA
LÍNEA!!!!!
Next Cell
End Sub
Dim nombre, ruta, temporal, utilrutavieja As String, largo, fin As
Integer
Workbooks.Open Application.GetOpenFilename("Libros de Excel (*.xls),
*.xls")
nombre = "[" & ActiveWorkbook.Name & "]"
ruta = "'" & ActiveWorkbook.Path & "\"
ActiveWorkbook.Close False
Range("B4:C5,B8:C8,B11:C18,B21:C21,B4:C5,B8:C8,B11:C18,B21:C21,B32:C34,B36:C
41,B43:C43").Select
For Each Cell In Selection
temporal = Cell.Formula
fin = WorksheetFunction.Search("]", temporal) + 1
largo = Len(temporal)
utilrutavieja = "'" & Mid(temporal, fin, largo - fin)
temporal = "=" & ruta & nombre & utilrutavieja
Cell.Formula = temporal ' ¡¡¡¡¡¡NO PASA DE ESTA
LÍNEA!!!!!
Next Cell
End Sub
1 respuesta
Respuesta de fejoal
1