LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Copy sheet without code?

Hello -
I have a macro that copies a sheet out of "ThisWorkbook", pastes it into
a new workbook, and then e-mails the new workbook to a recipient list. This
works fine.
My problem is, the "Sheet" object contains code - OnSelectionChange,
AfterDoubleClick, AfterRightClick Events. When the sheet is copied, this
code is also copied into the new book, so when the recipient opens and
selects a cell, the SelectionChanged event fires, causing an error. Thought
I could just throw in an error handler and avoid this, but it throws a
"Compile Error" and opens the debugger every time, which is confusing the
hell out of the recipients.
Is there a way to copy the sheet without the code, or programatically
erase the code?

Thanks for any help -
Sean


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
what is the vb code to copy rows from one sheet to another? bxc2739 Excel Discussion (Misc queries) 2 May 25th 06 07:48 PM
How do i copy a active sheet to a new sheet with code and everything Karill Excel Programming 2 April 11th 06 06:22 PM
Copy sheet without Code xcelion Excel Programming 4 July 7th 05 04:15 PM
Copy Sheet w/o VBA code Ron de Bruin Excel Programming 1 January 20th 04 04:42 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"