+ Reply to Thread
Results 1 to 4 of 4

Run procedure any time ANY workbook is opened

  1. #1
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Run procedure any time ANY workbook is opened

    Hi

    Is it possible to run a macro whenever any workbook is opened. I'm think something that uses Personal.xls or an Add-In, but I'm not sure how to use a workbook_open event with those two options that will trigger whenever a new workbook is opened.

    Thank You
    Last edited by davegugg; 05-05-2010 at 03:27 PM.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Run procedure any time ANY workbook is opened

    Please Login or Register  to view this content.
    This is workbook event code.
    To input this code, right click on the Excel icon on the worksheet
    (or next to the File menu if you maximise your workbooks),
    select View Code from the menu, and paste the code

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Run procedure any time ANY workbook is opened

    Thank You, that works great. However, what I'm doing is trying to create an "update links" prompt as in 03. I don't want the prompt to appear if the workbook contains no links or is the Personal.xlsb workbook. I tried coding with activeworkbook.name and activeworkbook.linksources but the code seems to execute before there is an activeworkbook, resulting in an error. Do you know of a workaround?

    Edit: Also, why when I close excel does the application remain open but the workbook closes? I want to close the entire application.

  4. #4
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Run procedure any time ANY workbook is opened

    Searched around and for some reason, checking (Show all windows in the Taskbar) under Advanced Excel Options fixed both issue I mentioned above. Excel 07 you crazy sob.

    Thanks again Bob Philips

+ 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