Hi emymeeky
I've gotta admit I don't understand your "Go" Button Code.
The Code copies Sheet "answer" to Sheet "separate" then Sheet "separate" is copied to Sheet6 then Sheet6 is copied to Sheet2 and finally Sheet2 is copied to Sheet "Subject". It seems to me this could be greatly simplified to eliminate a lot of the "middle men".
However, you indicate it works for you so I've not changed the Code except to add this line at the very top
Private Sub CommandButton1_Click()
Dim answer As String
answer = Cmbtablist.Value
Application.ScreenUpdating = False '<---Added this line
and these lines at the very bottom
Range("B7").Select
Call add_CBX '<---added this line
Application.ScreenUpdating = True '<---added this line
Unload Me
End Sub
The Code that does the work for the Checkboxes is in Modules 5 and 6.
Module 5
Option Explicit
Sub add_CBX()
Dim myCBX As CheckBox
Dim myCell As Range
With ActiveSheet
Call Delete_All_CBX
For Each myCell In ActiveSheet.Range("A7:A" & Range("B" & Rows.Count).End(xlUp).Row)
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top + 1, Width:=.Width, _
Left:=.Left, Height:=.Height)
With myCBX
.Caption = ""
End With
End With
Next myCell
End With
End Sub
Sub Clear_All_CBX()
Dim CB As CheckBox
For Each CB In ActiveSheet.CheckBoxes
CB.Value = False
Next CB
End Sub
Sub Delete_All_CBX()
ActiveSheet.CheckBoxes.Delete
End Sub
Module 6
Option Explicit
Sub Button1368_Click()
Dim LR As Long
Dim ws As Worksheet
Dim CB As CheckBox
Application.ScreenUpdating = False
Set ws = Sheets("final")
With ws
LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
If LR = 13 Then
LR = 15
End If
.Range("B15:M" & LR).Clear
LR = 15
For Each CB In ActiveSheet.CheckBoxes
If CB.Value = 1 Then
Range("B" & CB.TopLeftCell.Row & ":M" & CB.TopLeftCell.Row).Copy
ws.Range("B" & LR).PasteSpecial
LR = LR + 1
End If
Next CB
End With
Call Clear_All_CBX
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Try it...see if it does as you require.
Bookmarks