Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Move Event?

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    I have 2 workbooks. from one (book1), i have code that opens the other workbook (book2), and copies a sheet from book2 to book1. There is only one sheet in book2 so it closes when the sheet is copied.

    I am trying to get some code to run automatically after the sheet is copied. The problem is, i already have multile books already coded. So i was wondering if there is a "after move sheet" event to start some other code? is this possible?
    Thanks

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I like that.
    "after move sheet" event.
    After seeing robfo0's complicated workbook, will need "drink beer" or "take aspirin" event...
    Anyway, check out this link from Chip Pearson on creating a class module for using application level events. Maybe you can trap the closing of the workbook, which provided the copied sheet, to run your code.
    http://www.cpearson.com/excel/AppEvent.htm
    Download the sample wbk. If you do not know much about creating class modules, it would be a great thing to learn. Pretty much the foundation of VB.
    Tom

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •