+ Reply to Thread
Results 1 to 3 of 3

Thread: ThisWorkbook/ActiveWorkbook

  1. #1
    John Keith
    Guest

    ThisWorkbook/ActiveWorkbook

    What is the difference in using:
    ThisWorkbook.Path
    -vs-
    ActiveWorkbook.Path

    Or any of the other Properties or Methods that can follow.


    --
    Regards,
    John

  2. #2
    ben
    Guest

    RE: ThisWorkbook/ActiveWorkbook

    ThisWorkBook object refers to the workbook that the code is contained in


    ActiveWorkBook object refers to the workbook that is currently on top
    (Active) in Excel


    They can return the same object, but if the workbook running the code is not
    the active workbook then they will return different objects.

    --
    When you lose your mind, you free your life.


    "John Keith" wrote:

    > What is the difference in using:
    > ThisWorkbook.Path
    > -vs-
    > ActiveWorkbook.Path
    >
    > Or any of the other Properties or Methods that can follow.
    >
    >
    > --
    > Regards,
    > John


  3. #3
    Registered User
    Join Date
    01-05-2006
    Posts
    6
    Thisworkbook is always the workbook within which the macro is stored. Activeworkbook is any member of the Workbooks collection - activated by Workbooks(xx).activate


+ 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.2.0