+ Reply to Thread
Results 1 to 4 of 4

Workbook_activate or workbook_open?

  1. #1
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Workbook_activate or workbook_open?

    Hey

    I've made a simple macro that enables the document to refresh data from Bloomberg automatically...

    Please Login or Register  to view this content.
    But can anyone of you tell me if it's right to use workbook_active - or is workbook_open the appropriate one, when I want the data to refresh every time I open the document (I don't really know the difference between those two)..?

    Thanks!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Workbook_activate or workbook_open?

    It will be good if you use Workbook_open. If you use workbook_activate, each time you activate the workbook, the code will run. But it will run only once when the workbook is open, even if its activated multiple times, if you use the workbook_open event.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Workbook_activate or workbook_open?

    A very nice explanation, thanks a lot!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Workbook_activate or workbook_open?

    You are welcome.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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