• Macro in 2007

    Author
    Topic
    #461937

    I recorded three macro using excel 2007, and save it in 2003 compatible, but when I run it in excel 2003,

    from 1st macro, appears error in line

    .ThemeColor = xlThemeColorLight1

    2nd macro, appear error in line

    ActiveWorkbook.Worksheets(“01-General Ledger”).AutoFilter.Sort.SortFields.Clear

    which those problem do not appears when I run this macro using excel 2007

    please find file as attached

    thanks

    Indra

    Viewing 1 reply thread
    Author
    Replies
    • #1173897

      The ThemeColor property doesn’t exist in Excel 2003 and before, themes were introduced in Excel 2007. So you will have to remove that line and the two below it, for TintAndColor and ThemeFont are new in Excel 2007 too.

      The Sort method of the AutoFilter object is new too, you can’t use it in Excel 2003 or before.

      If you want to develop workbooks for Excel 2003, you should do so in Excel 2003, not in Excel 2007 – there’s too much danger of using new features.

    • #1173970

      thanks for the reply, Hans

      regards

      Indra

    Viewing 1 reply thread
    Reply To: Macro in 2007

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: