I have a form on which I swap out a datagridview and a panel. There is a button on the form for this. This is for reporting some data. It works except when you perform a certain sequence of events and then click the swap button while the dgv is showing to switch to the panel, the dgv won't delete. Why wouldn't a datagridview delete? This code definitely works much of the time. And in the case where the dgv does not go away, I checked and the code is definitely being executed.

Code:
ReportDataGridView.Dispose()
ReportDataGridView = Nothing
Any ideas or anything I could do to troubleshoot this?