Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:14:29+00:00 2026-05-30T12:14:29+00:00

In Excel 2003 Files are saved with extension .xls and in Excel 2007 .xlsm

  • 0

In Excel 2003 Files are saved with extension .xls and in Excel 2007 .xlsm (macro enabled) Then how we can make our excel file with VBA code run on both version Excel 2003 and Excel 2007? is it good idea to use excel 2003 for programming because those files with VBA code work on excel 2007? I do not know if they are working. I am new to VBA programming.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:14:31+00:00Added an answer on May 30, 2026 at 12:14 pm

    is it good idea to use excel 2003 for programming because those files with VBA code work on excel 2007?

    Abhi

    It actually depends on what exactly you plan the application to do. There are many things that you can do in Excel 2007 which you cannot in Excel 2003. So how will you code that in Excel 2003. If you want to do basic stuff then yes, you can code in Excel 2003 so that it works with Excel 2003/2007/2010.

    Also it is but natural that if you are coding in Excel 2003 then the file will be saved with an xls extension. If you plan to code in Excel 2007/2010 then save the file as .xls so that it works with Excel 2003.

    FOLLOWUP

    This is a classic example of what I mean. When you want to sort the data in Excel 2007 and if you record the macro this is what you get but this will not work in 2003.

    Sub Macro1()
    '
    ' Macro1 Macro
    '
    
    '
        Columns("A:C").Select
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
        ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A2:A9"), _
            SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Sheet1").Sort
            .SetRange Range("A1:C9")
            .Header = xlYes
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
    End Sub
    

    However if you record the macro in Excel 2003, you will get something like this (doing this from memory as I will otherwise have to reboot my pc to record the macro LOL). Now this piece of code will work with every version 🙂

    Sub Macro1()
    '
    ' Macro1 Macro
    '
    
    '
        Columns("A:C").Select
        Selection.Sort Key1:=ws1.Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    End Sub
    

    HTH

    Sid

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Excel 2003 on a Windows 7 Professional setup. In my Personal.xls file,
What is the best way/library to read Excel 2003 and 2007 files using C#?
I am looking to write to an excel (.xls MS Excel 2003 format) file
I have an excel file (Excel 2003 / xls format) and I want to
I Have an Excel 2003 file with a line similar to this: I need
I'm trying to import an excel file Excel97-2003 (the first sheet only) into an
I have an excel 2003 vsto workbook that I would like to make available
I have a set od Excel (2003) sheets saved as .xlt format. Now ,how
I have written a few Excel 2003/2007 add-ins using VSTO, and I usually end
I have an excel template that uses a macro to save the file, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.