+ Reply to Thread
Results 1 to 6 of 6

MAcro to Copy Worksheet and Worksheet Events

  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Talking MAcro to Copy Worksheet and Worksheet Events

    Hi,
    I have a worksheet that utilizes a Worksheet Change Event. I created a macro to copy the sheet and that works fine except for the fact that it doesn't contain the Worksheet Change event. Any idea on how I can do this (if possible) in a macro?

    Thanks in advance.

    Max57
    Last edited by max57; 07-28-2009 at 08:32 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: MAcro to Copy Worksheet and Worksheet Events

    not clear.
    suggest you call the macro from within the worksheet change event
    worksheet change event occurs when target value changes.

  3. #3
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: MAcro to Copy Worksheet and Worksheet Events

    i assume you might mean -
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: MAcro to Copy Worksheet and Worksheet Events

    Hi all,
    I had originally used a macro recorder macro and that's where my problem originated from. After reading the posts, I realized that I wasn't copying the Worksheet rather, only the worksheet cells. As a result, I wasn't getting the Worksheet Change event code copied into the new sheet.

    I found a very good snippet of code that added a little more functionality to what I wanted to do and adopted it to my needs.

    Please Login or Register  to view this content.
    Thank you for your suggestions which inevitably led me to this conclusion.

    Max57

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: MAcro to Copy Worksheet and Worksheet Events

    I wouldn't declare sheets as a variable, use sht or similar instead
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: MAcro to Copy Worksheet and Worksheet Events

    Point well taken.
    Thanks for the heads up.

    Max57

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1