Move Event?

robfo0

Active Member
Joined
Feb 19, 2002
Messages
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
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top