+ Reply to Thread
Results 1 to 3 of 3

Copy and Paste Data based on a value within a cell

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    26

    Copy and Paste Data based on a value within a cell

    Hi I have this code I am using to copy and paste.

    The problem I have is - I can get the copy and paste to work and stop if I insert an ActiveX control button assigned to the StartTimer1 and StopTimer1 but I wish the Macro to run automatically based on a value in a cell.

    For example - Sheet1 cell A1 has the number 1 inserted into the cell - then the StartTimer1 starts copy and pasting the data. Once the the number 1 is cleared from the cell the StopTimer1 stops the copy and pasting if the number 1 is re-entered into A1 the copy and paste starts again - and so on and so on.

    Please Login or Register  to view this content.
    Thank you for your time

    Regards
    Gally

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy and Paste Data based on a value within a cell

    Paste this into your sheet1 worksheet module,

    Enter 1 in A1 and delete then delete it to test code.
    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copy and Paste Data based on a value within a cell

    Hi JapanDave thank you for the very swift reply.

    That has worked with regards to once the value 1 is entered into A1 the data is copy and pasting but it's not stopping once the value one is cleared from the cell A1 but i believe that might be something to do with the code for the StopTimer1 being in-correct.

    Any ideas?

    Thank you for your help.

    Regards
    Gally

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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