![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|