+ Reply to Thread
Results 1 to 8 of 8

Convert Worksheet Change to Module

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    peterborough
    MS-Off Ver
    2010
    Posts
    16

    Convert Worksheet Change to Module

    Hi Guys

    Firstly, I know nothing of vba.

    I have a worksheet change macro which scans a column (starting form 8 down) waiting for the value "yes". When true it copies the whole row and pastes it into an archive sheet, deletes the original while keeping columns A-B.

    This works great but i would like to convert it to a button when clicked the action will search the whole column (starting from 8 down) and archive any rows with yes in, delete the original while keeping columns A-B.

    My current code is below:
    Please Login or Register  to view this content.
    The reason for this change is that i archive a lot at once and this current code takes around 5s per yes. If i was able to update all to yes and then click GO this should be faster.

    I have also attached the current sheet.

    Thank you in advance.
    Andy
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Convert Worksheet Change to Module

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    11-21-2014
    Location
    peterborough
    MS-Off Ver
    2010
    Posts
    16

    Re: Convert Worksheet Change to Module

    Quote Originally Posted by Mumps1 View Post
    Try:
    Please Login or Register  to view this content.
    Hi Mumps1,

    Thanks for the help, it works!
    I have one thing left for this code, my previous code copied format and text whereas this copies formulas.
    Is there a way I can copy the same way?


    EDIT:

    I got it to work
    Please Login or Register  to view this content.
    Last edited by infernojaffa; 12-10-2015 at 08:09 AM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Convert Worksheet Change to Module

    Glad it worked out.

  5. #5
    Registered User
    Join Date
    11-21-2014
    Location
    peterborough
    MS-Off Ver
    2010
    Posts
    16

    Re: Convert Worksheet Change to Module

    Quote Originally Posted by Mumps1 View Post
    Glad it worked out.
    Hi Mumps1,

    Actually this isn't working on some occasions. Sometimes just the text will be copied and other times it will copy formula.
    I'm hoping to only copy values and format.
    Are you able to provide any help on this matter?

    Thanks
    Andy
    Last edited by infernojaffa; 12-10-2015 at 11:44 AM.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Convert Worksheet Change to Module

    Try:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-21-2014
    Location
    peterborough
    MS-Off Ver
    2010
    Posts
    16

    Re: Convert Worksheet Change to Module

    Quote Originally Posted by Mumps1 View Post
    Try:
    Please Login or Register  to view this content.
    Perfect!
    Thank you.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Convert Worksheet Change to Module

    You are very welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Convert Workbook_Sheetchange to a module Sub
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-27-2014, 03:06 AM
  2. [SOLVED] Convert code in a class module to a macro
    By Consty1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2013, 09:44 AM
  3. [SOLVED] Convert Formula to VB Module
    By elliotencore in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-08-2013, 11:10 AM
  4. Scan a module and change data in the module
    By ColeJones in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2011, 05:15 PM
  5. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM
  6. Import, format, convert, print VBA module
    By rinser in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-27-2009, 07:51 AM
  7. [SOLVED] Calling worksheet module from other module.
    By Michael Malinsky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2005, 04:50 PM
  8. Run worksheet module code from workbook module?
    By keithb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2005, 12:05 AM

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