JessicaKinnear
New Member
- Joined
- Jan 6, 2021
- Messages
- 25
- Office Version
- 365
- Platform
- Windows
Hello,
I have the code below in a spreadsheet which works fine. However someone has used my template and now the code isn't working and I'm getting the error code X400. Does anyone know what the error might be?
Thanks!
I have the code below in a spreadsheet which works fine. However someone has used my template and now the code isn't working and I'm getting the error code X400. Does anyone know what the error might be?
VBA Code:
Sub PrintStuff()
Dim vShts As Variant
vShts = Sheets("Set up & Print").Range("Z1")
If Not IsNumeric(vShts) Then
Exit Sub
Else
Select Case vShts
Case 1
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 2
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 3
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 4
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 5
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 6
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 7
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 8
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 9
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 10
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 11
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 12
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 13
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 14
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 15
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 16
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 17
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 18
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 19
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 20
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 21
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 22
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 23
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 24
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 25
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 26
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 27
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 28
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 29
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 30
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 31
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 32
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 33
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 34
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 35
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 36
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Tenant 36", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 37
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Tenant 36", "Tenant 37", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 38
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Tenant 36", "Tenant 37", "Tenant 38", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 39
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Tenant 36", "Tenant 37", "Tenant 38", "Tenant 39", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
Case 40
Sheets(Array("Cover", "Introduction", "Budget DETAILED", "Apportionment", "Schedule Split", "Tenant 1", "Tenant 2", "Tenant 3", "Tenant 4", "Tenant 5", "Tenant 6", "Tenant 7", "Tenant 8", "Tenant 9", "Tenant 10", "Tenant 11", "Tenant 12", "Tenant 13", "Tenant 14", "Tenant 15", "Tenant 16", "Tenant 17", "Tenant 18", "Tenant 19", "Tenant 20", "Tenant 21", "Tenant 22", "Tenant 23", "Tenant 24", "Tenant 25", "Tenant 26", "Tenant 27", "Tenant 28", "Tenant 29", "Tenant 30", "Tenant 31", "Tenant 32", "Tenant 33", "Tenant 34", "Tenant 35", "Tenant 36", "Tenant 37", "Tenant 38", "Tenant 39", "Tenant 40", "Landlord_SC Cap Shortfall", "Contacts")).PrintOut
End Select
End If
End Sub
Thanks!