Ashe77
New Member
Hi. I have a WIP document that a friend who is far better at VBA than I made for me and it's designed so that at the click of a button on an overview page,it goes into 6 sheets, looks in 6 sheets for a status type, copies where appropriate and pastes into a summary sheet (for example, all "Open" tasks).
It seems to be working for one sheet, the first one but not for the others despite the code being the same. I have checked the references to the check boxes on the overview page and cell references and they all match up. For reference, the sheets are called "Esso Let", "Tesco Dev", "Tesco Tablet", "Tesco Hand Scanners", "Spare 3" and ""Spare 4" and the summary sheets are "In Progress" and "Open Issues"
It seems to be working for one sheet, the first one but not for the others despite the code being the same. I have checked the references to the check boxes on the overview page and cell references and they all match up. For reference, the sheets are called "Esso Let", "Tesco Dev", "Tesco Tablet", "Tesco Hand Scanners", "Spare 3" and ""Spare 4" and the summary sheets are "In Progress" and "Open Issues"
Code:
If ActiveSheet.Shapes("Check Box 16").ControlFormat.Value = 1 Then
CopySheet = Range("F4").Value
SheetHeader = "Esso Let"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
If ActiveSheet.Shapes("Check Box 17").ControlFormat.Value = 1 Then
CopySheet = Range("F14").Value
SheetHeader = "Tesco Dev"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
If ActiveSheet.Shapes("Check Box 21").ControlFormat.Value = 1 Then
CopySheet = Range("F24").Value
SheetHeader = "Tesco Tablet"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
If ActiveSheet.Shapes("Check Box 22").ControlFormat.Value = 1 Then
CopySheet = Range("F34").Value
SheetHeader = "Tesco Hand Scanners"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
If ActiveSheet.Shapes("Check Box 23").ControlFormat.Value = 1 Then
CopySheet = Range("F44").Value
SheetHeader = "Spare 3"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
If ActiveSheet.Shapes("Check Box 29").ControlFormat.Value = 1 Then
CopySheet = Range("F54").Value
SheetHeader = "Spare 4"
Sheets(CopySheet).Select
Call PasteFunctionInfo(CopySheet, SheetHeader)
Sheets(CopySheet).Select
Call PasteFunctionAction(CopySheet, SheetHeader)
End If
Sheets("Overview").Select
End1: