PC Review


Reply
Thread Tools Rate Thread

Copy worksheet to new workbook question

 
 
=?Utf-8?B?Q2h1Y2sgTQ==?=
Guest
Posts: n/a
 
      25th Oct 2007
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      25th Oct 2007
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" <(E-Mail Removed)> wrote in message news:0D5D9442-C3BA-4B72-B1BB-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?Q2h1Y2sgTQ==?=
Guest
Posts: n/a
 
      25th Oct 2007
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" <(E-Mail Removed)> wrote in message news:0D5D9442-C3BA-4B72-B1BB-(E-Mail Removed)...
> > 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 With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      25th Oct 2007
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" <(E-Mail Removed)> wrote in message news:859446EF-FC2A-4C8F-BD6E-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message news:0D5D9442-C3BA-4B72-B1BB-(E-Mail Removed)...
>> > 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 With Quote
 
=?Utf-8?B?Q2h1Y2sgTQ==?=
Guest
Posts: n/a
 
      25th Oct 2007
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" <(E-Mail Removed)> wrote in message news:859446EF-FC2A-4C8F-BD6E-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message news:0D5D9442-C3BA-4B72-B1BB-(E-Mail Removed)...
> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy cell value from one worksheet to matching worksheet in another workbook rech Microsoft Excel Programming 4 29th Sep 2011 03:02 PM
Copy Excel Worksheet to new Workbook via VBA without Links to original Workbook JamesDMB Microsoft Access Form Coding 0 21st Mar 2007 06:13 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Microsoft Excel Misc 1 16th Mar 2006 06:55 PM
How do I copy a worksheet form a workbook in my workbook Neil Atkinson Microsoft Excel Programming 1 12th Oct 2005 12:23 PM
copy worksheet from closed workbook to active workbook using vba =?Utf-8?B?bWFuZ28=?= Microsoft Excel Worksheet Functions 6 9th Dec 2004 07:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.