+ Reply to Thread
Results 1 to 2 of 2

Rules about naming files with macros.

  1. #1
    Registered User
    Join Date
    09-28-2013
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2010
    Posts
    36

    Rules about naming files with macros.

    Forgive me, but I'm new to macros and I'm trying to figure out the rules. I never realized there was .XLSX and .XLSM (I'm using Excel 2010). I have a few short questions that are probably obvious to everyone but me:

    a) if I create a macro in a file, does it HAVE to be saved as an .XLSM file?
    b) can an .XLSX file ever contain a macro?
    ....and the biggy....
    c) my understanding so far is that if I want a macro to be available to all Excel files on my computer, I need to save it to the PERSONAL.XLSB file (think that's the file extension)....so if I do that will I be able to use that macro on a regular .XLSX file?

    Thanks all!

  2. #2
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Rules about naming files with macros.

    Hi KimC,

    a)No, You can also save it in .xlsb, and .xls formats.
    b)No, a .xlsx file cannot contain a macro. (You can of course start writing the macro on an .xlsx file, but excel won't allow you to save it in that format.)
    c)Yes. If you save a macro in the personal macro workbook, you can use that macro on a regular .xlsx file.

    by the way: note that you can also run a macro that is stored in any excel file to do some work on .xlsx files.
    So for example, you might have an .xlsm file that contains your macros, and you can make this macro do stuff on an .xlsx file.

    And also note that you can also store your macros in an add-in, instead of saving them in the personal macroworkbook.
    It will also enable you to call the macros anytime from any workbook, as long as that add-in is activated.

    hope it helps.
    If I have helped, Don't forget to add to my reputation (click on the star icon below the post).
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved).
    Use code tags when posting your code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Naming of Excel macros
    By pmehrotr in forum Excel General
    Replies: 4
    Last Post: 12-09-2012, 04:36 AM
  2. Rules for Naming Cells and Ranges
    By excelname in forum Excel General
    Replies: 1
    Last Post: 06-15-2010, 01:15 PM
  3. Naming ranges in macros
    By sbrandt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2007, 12:15 PM
  4. Naming Cells with Macros
    By aynsley in forum Excel General
    Replies: 1
    Last Post: 06-08-2006, 03:55 PM
  5. [SOLVED] applying rules to Excel Sheets using Macros
    By pankaj.agr@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2005, 10:06 AM

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