It must not have liked using its name as its Item(). Usually you can get away with this.
Try it this way instead. It's a bit longer, but should be more stable. Working with component names can be tricky, because the system automatically put a colon : and an Integer at the end of each name, by default, so multiple instances of it have different names from each other.
Dim oADoc As AssemblyDocument = ThisAssembly.Document
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
Dim oMBPart As PartComponentDefinition = oADef.Occurrences.ItemByName("Rectangular Top Section for spikes").Definition
Dim oBody As SurfaceBody
For Each oSBody As SurfaceBody In oMBPart.SurfaceBodies
' If oSBody.Name = "Solid 2x3" Then
If oSBody.Name.Contains("Solid 2x3") Then
If oSBody.Visible = False Then
For Each oComp As ComponentOccurrence In oADef.Occurrences
If oComp.Name.Contains("Top Section") Then
If oComp.Suppressed = False Then
oComp.Suppress
End If
End If
Next
End If
End If
Next
Wesley Crihfield

(Not an Autodesk Employee)