Results 1 to 11 of 11

Can't run macros from Excel 2003 in Excel2007

Threaded View

  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    mexico
    MS-Off Ver
    Excel 2007
    Posts
    9

    Smile Can't run macros from Excel 2003 in Excel2007

    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
    Last edited by romperstomper; 07-15-2010 at 03:10 PM. Reason: Added code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1