+ Reply to Thread
Results 1 to 3 of 3

Can I use a macro in ANY workbook?

  1. #1
    Forum Contributor
    Join Date
    11-30-2005
    Location
    Penzance Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    198

    Can I use a macro in ANY workbook?

    Hi to All,

    Is there somewhere/someway of storing a macro so that I can use it when I open any workbook.

    I have to export a new report to Excel each week and would like to run the macro on this exported report.

    I have the macro (found on this site), can this be (easily) done?


    TIA

    Keith
    Last edited by VBA Noob; 02-11-2009 at 06:12 PM.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Can I use a macro in ANY workbook?

    Depends on what you are doing. If it is in a Module, you can save it to your Personal workbook. If you don't have one, record a macro and when it asks for the name to store it, be sure to select the personal workbook from the drop list. From then on, it will open when you open Excel.

    The other method is to do an AddIn.

    Note that some macros use ActiveWorkbook which is assumed for some macros or ThisWorkbook. ThisWorkbook is where the macro is stored so this may cause grief if you don't understand the concept.

  3. #3
    Forum Contributor
    Join Date
    11-30-2005
    Location
    Penzance Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    198

    Smile Re: Can I use a macro in ANY workbook?

    Hi Kenneth,

    That was an amazingly quick reply.

    I have tried your suggestion and it works exactly as you explained, that has saved me so much work each week, thank you very much.


    Regards,

    Keith

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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