While trying to open a form I get the following error:
An error occurred creating the form. See Exception.InnerException for details. The error is: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Previously the form loaded flawlesly. I made several small changes to subs contained in the form, and after that the problem appeared. These changes included some changes in the constructor.
I've tried to track down the problem simply by adding message boxes near potential problem areas, and it seems that the exception is thrown before the constructor is even run. The error message baffles me, since I'm not knowingly using any parameters, and the routine opening the form doesn't refer to any arrays (or any other variables).
Here is the part of the source code that the error message refers to:
Expand|Select|Wrap|Line Numbers
- Private Sub SugNewTagsBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SugNewTagsBtn.Click
- SugNewTagsForm.Show()
- End Sub