+ Reply to Thread
Results 1 to 2 of 2

Copying data from one worksheet to another - data is not copying into next available line

  1. #1
    Registered User
    Join Date
    07-22-2014
    Location
    London
    MS-Off Ver
    2007
    Posts
    1

    Copying data from one worksheet to another - data is not copying into next available line

    Hello - I am trying to copy data from one worksheet to another. However the code below doesn't seem to be pasting the copied data (from Assurance Plan 2013-14) into the next available line on my other worksheet (Action Monitoring Sheet1). I am using Check boxes linked to specifc rows.

    Can someone please help?

    Thank you in advance.

    Dim x As Integer
    Dim y As Integer
    Private Sub CheckBox1_Click()

    If CheckBox1.Value = True Then
    Range("D649:G649").Select
    Selection.Copy
    Sheets("Action Monitoring Sheet1").Activate
    x = 1
    Do Until ActiveSheet.Cells(x, 1) = vbNullString
    x = x + 1
    Loop
    ActiveSheet.Range("B" & x).Select
    Selection.PasteSpecial
    Sheets("Assurance Plan 2013-14").Select
    End If

    If CheckBox1.Value = False Then
    'No Action - this a control measure to prevent accidental deletion of actions added to tracker'
    End If
    End Sub

    Private Sub CheckBox2_Click()

    If CheckBox2.Value = True Then
    Range("D650:G650").Select
    Selection.Copy
    Sheets("Action Monitoring Sheet1").Activate
    y = 1
    Do Until ActiveSheet.Cells(y, 1) = vbNullString
    y = y + 1
    Loop
    ActiveSheet.Range("B" & y).Select
    Selection.PasteSpecial
    Sheets("Assurance Plan 2013-14").Select
    End If

    If CheckBox2.Value = False Then
    'No Action - this a control measure to prevent accidental deletion of actions added to tracker'
    End If
    End Sub
    Private Sub CheckBox3_Click()

    If CheckBox3.Value = True Then
    Range("D651:G651").Select
    Selection.Copy
    Sheets("Action Monitoring Sheet1").Activate
    y = 1
    Do Until ActiveSheet.Cells(y, 1) = vbNullString
    y = y + 1
    Loop
    ActiveSheet.Range("B" & y).Select
    Selection.PasteSpecial
    Sheets("Assurance Plan 2013-14").Select
    End If

    If CheckBox3.Value = False Then
    'No Action - this a control measure to prevent accidental deletion of actions added to tracker'
    End If
    End Sub

    Private Sub CheckBox4_Click()

    If CheckBox4.Value = True Then
    Range("D652:G652").Select
    Selection.Copy
    Sheets("Action Monitoring Sheet1").Activate
    y = 1
    Do Until ActiveSheet.Cells(y, 1) = vbNullString
    y = y + 1
    Loop
    ActiveSheet.Range("B" & y).Select
    Selection.PasteSpecial
    Sheets("Assurance Plan 2013-14").Select
    End If

    If CheckBox4.Value = False Then
    'No Action - this a control measure to prevent accidental deletion of actions added to tracker'
    End If
    End Sub

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copying data from one worksheet to another - data is not copying into next available l

    Please you code tags around your code. Makes it easier for us to see. Use this for your code. Just change the range and checkbox name for the other checkboxes:

    Please Login or Register  to view this content.

+ 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. Automatically copying data to subtotal line
    By tmarcyan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2012, 06:51 PM
  2. [SOLVED] Code from tigeravatar ,Copying data from one sheet and copying it
    By DanielRay in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-07-2012, 03:07 PM
  3. Replies: 1
    Last Post: 10-10-2012, 10:23 AM
  4. Copying Data from Master and Creating new worksheet to save data
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2012, 06:43 AM
  5. Replies: 1
    Last Post: 11-22-2011, 02:36 PM

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