Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Copy worksheet to new workbook question

Hi,
I have a worksheet that has code in the Worksheet_Change event. Through VBA,
I copy that worksheet to a new workbook. Once the Copy is complete, I would
like to delete the Worksheet_Change event code in the copied (new) worksheet.
Can this be done via VBA?
--
TIA
Chuck M.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy worksheet to new workbook question

Yes this is possible
Are you the only user of the code ?

let me know than I give you a good answer


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi,
I have a worksheet that has code in the Worksheet_Change event. Through VBA,
I copy that worksheet to a new workbook. Once the Copy is complete, I would
like to delete the Worksheet_Change event code in the copied (new) worksheet.
Can this be done via VBA?
--
TIA
Chuck M.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Copy worksheet to new workbook question

Hi Ron,
Yes I am. The main workbook I created is a company budget with many columns
of data. The columns are hidden and unhidden based on code that fires on the
worksheet-change event. I have a macro that creates separate workbooks for
different departments within the company. Once the company budget is copied
to a new workbook, I hide rows and columns that do not pertain to that
department. Once the departmental workbooks are created, the row and column
presentation should be unchangable. I want to disable the worksheet_change
event code, so that the users of the departmental workbooks do not fire that
code that changes their departmetal presentation.

I hope this overview helps.
--
Thanks.
Chuck M.


"Ron de Bruin" wrote:

Yes this is possible
Are you the only user of the code ?

let me know than I give you a good answer


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi,
I have a worksheet that has code in the Worksheet_Change event. Through VBA,
I copy that worksheet to a new workbook. Once the Copy is complete, I would
like to delete the Worksheet_Change event code in the copied (new) worksheet.
Can this be done via VBA?
--
TIA
Chuck M.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy worksheet to new workbook question

See Chip's code then
http://www.cpearson.com/excel/vbe.aspx

The other option is to create a new workbook with one sheet and copy all the cells in
this worksheet

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi Ron,
Yes I am. The main workbook I created is a company budget with many columns
of data. The columns are hidden and unhidden based on code that fires on the
worksheet-change event. I have a macro that creates separate workbooks for
different departments within the company. Once the company budget is copied
to a new workbook, I hide rows and columns that do not pertain to that
department. Once the departmental workbooks are created, the row and column
presentation should be unchangable. I want to disable the worksheet_change
event code, so that the users of the departmental workbooks do not fire that
code that changes their departmetal presentation.

I hope this overview helps.
--
Thanks.
Chuck M.


"Ron de Bruin" wrote:

Yes this is possible
Are you the only user of the code ?

let me know than I give you a good answer


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi,
I have a worksheet that has code in the Worksheet_Change event. Through VBA,
I copy that worksheet to a new workbook. Once the Copy is complete, I would
like to delete the Worksheet_Change event code in the copied (new) worksheet.
Can this be done via VBA?
--
TIA
Chuck M.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Copy worksheet to new workbook question

Looks like Chip has the answer I was looking for.

Thanks for pointing me in that direction.

--
Have a good day.
Chuck M.


"Ron de Bruin" wrote:

See Chip's code then
http://www.cpearson.com/excel/vbe.aspx

The other option is to create a new workbook with one sheet and copy all the cells in
this worksheet

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi Ron,
Yes I am. The main workbook I created is a company budget with many columns
of data. The columns are hidden and unhidden based on code that fires on the
worksheet-change event. I have a macro that creates separate workbooks for
different departments within the company. Once the company budget is copied
to a new workbook, I hide rows and columns that do not pertain to that
department. Once the departmental workbooks are created, the row and column
presentation should be unchangable. I want to disable the worksheet_change
event code, so that the users of the departmental workbooks do not fire that
code that changes their departmetal presentation.

I hope this overview helps.
--
Thanks.
Chuck M.


"Ron de Bruin" wrote:

Yes this is possible
Are you the only user of the code ?

let me know than I give you a good answer


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Chuck M" wrote in message ...
Hi,
I have a worksheet that has code in the Worksheet_Change event. Through VBA,
I copy that worksheet to a new workbook. Once the Copy is complete, I would
like to delete the Worksheet_Change event code in the copied (new) worksheet.
Can this be done via VBA?
--
TIA
Chuck M.


Reply
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
Copy worksheet from one workbook to a master workbook mvannatta Excel Worksheet Functions 3 April 15th 09 08:32 PM
How to Copy entire Worksheet from Workbook S to Workbook D kris Excel Programming 3 June 20th 07 02:03 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
How do I copy a worksheet form a workbook in my workbook Neil Atkinson Excel Programming 1 October 12th 05 12:23 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 11:14 PM.

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

About Us

"It's about Microsoft Excel"