Results 1 to 7 of 7

Copy/paste data using checkbox-clear when unchckd & multiple selections paste in next cell

Threaded View

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Copy/paste data using checkbox-clear when unchckd & multiple selections paste in next cell

    Hi,
    I've got checkbox in a worksheet called 'Checklist' and I am using the below code to copy the data in the cells next to the checkboxes when selected into another worksheet named 'Estimate'. The pasted cells are to start from B12. I need to be able to check multiple boxes and have them paste in the next available cells from B12, at the moment they just paste over the top of the current data in B12. I also would like the data cleared when the boxes are deselected, the only code I had figured out clears everything in the worksheet from B12, but I have info in various other columns and rows. I've attached my workbook, please help!!!

    Module:
    Sub Chbx()
    Dim shp As Shape, ws As Worksheet, msg As String, c As Integer
    Dim cop
    c = 1
    With Sheets("Estimate")
    cop = .Rows(1).Value
    .Rows(1).Value = cop
    End With
    For Each ws In ActiveWorkbook.Worksheets
    If Not ws.Name = "Estimate" Then
    For Each shp In ws.Shapes
            If shp.Type = msoFormControl Then
                If shp.FormControlType = xlCheckBox Then
                    If shp.ControlFormat.Value = 1 Then
                        c = c + 11
    ws.Range(shp.ControlFormat.LinkedCell).Offset(, 1).Resize(, 1).Copy Sheets("Estimate").Cells(c, 2)
                    End If
                End If
            End If
    Next shp
    End If
    Next ws
    End Sub
    Checkbox macros (for each checkbox):
    Sub CheckBox3_Click()
    Call Chbx
    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy/Paste Multiple Selections
    By molly13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2015, 12:59 PM
  2. Replies: 1
    Last Post: 01-15-2014, 11:12 AM
  3. Using a Checkbox to Copy and Paste Data from One Sheet to Another
    By DLnot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 04:57 PM
  4. Copy and paste for multiple selections
    By amartino44 in forum Excel General
    Replies: 3
    Last Post: 07-12-2013, 02:34 PM
  5. [SOLVED] Copy/Paste & Clear Contents Macro on multiple spreadsheet
    By greggatz in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-01-2012, 10:16 AM
  6. Copy and paste to the next clear cell???!!!
    By Andrewsayerhpv in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-09-2010, 08:54 AM
  7. use checkbox to copy, paste and delete data
    By nazries in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2010, 08:52 AM

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