Private Sub resetstrip(ByVal itemcollection As ToolStripItemCollection) Dim itemindex As Int32 For itemindex = 0 To itemcollection.Count - 1 itemcollection.Item(itemindex).Visible = True If Not TypeOf itemcollection.Item(itemindex) Is ToolStripSeparator Then Dim menuitem As ToolStripMenuItem = TryCast(itemcollection.Item(itemindex), ToolStripMenuItem) If Not (menuitem Is Nothing) Then Dim MMmenuItem As <SOMETHING> = CType(itemcollection.Item(itemindex),<SOMETHING>) MMmenuItem.ControlID = MMmenuItem.ControlID If menuitem.DropDownItems.Count > 0 Then resetstrip(menuitem.DropDownItems) End If End If End If NextI' cant seem to find what I should be casting