Hi, I have a problem that I can't run a spreadsheet made in Excel 2003 with macros when I open it with Excel 2007. In all the cells it gives me errors. I already have enable all the macros and security options in 2007. Even the safe location to open it. Is there something new in 2007 that won't let the macro run? Here is the macro just in case:
Sub Desglosa()
Dim cuentas(100) As String
cadena = ActiveCell.Value
Sheets("Analiza Cuentas").Select
Cells.Select
Selection.ClearContents
Range("A1").Select
Range("B4").Value = "Nombre Cta"
Range("C4").Value = "Descripción Cta"
Range("D4").Value = "Movto Mes"
Range("E4").Value = "Ac Anual a la Fecha"
y = 1
For x = 1 To Len(cadena)
If Mid$(cadena, x, 1) <> "," Then cuentas(y) = cuentas(y) + Mid$(cadena, x, 1) Else y = y + 1
Next x
For x = 1 To y
celda = Str$(x + 5)
celda = Right$(celda, Len(celda) - 1)
celdab = "B" + celda
celdac = "C" + celda
celdad = "D" + celda
celdae = "E" + celda
Range(celdac).Value = cuentas(x)
Formula1 = "=nomcta(" + celdac + ")"
Range(celdab).Formula = Formula1
If Range(celdab).Value = "101" Then Range(celdab).Value = "Cta. Inexistente"
Formula2 = "=salmul(" + celdac + ",month(fecha),year(fecha))"
Range(celdad).Formula = Formula2
Formula3 = "=salacmul(" + celdac + ",month(fecha),year(fecha))"
Range(celdae).Formula = Formula3
Next x
Range("A1").Select
End Sub
Thanks
Bookmarks