Joacim Andersson: I decided it would be fun to create a Project which filled in Magic Squares & provided tools making it convenient for a User to generate various special Magic Squares.

It seemed handy to use a Scroll Bar to specify the size of the square from 3*3 to 25*25

When the Scroll bar is moved, the code creates the appropriate array of either Labels (for program-generated squares) or Textboxes for User entry of values.

If you have a suggestion for some mechanism other than a control array, I would be glad to consider it.

BTW: I find it handy to use a Scroll Bar and a Label for User input of values which must be integers: Order of a polynomial, size of Magic Square, et cetera.
No need to parse Textbox entries.

User is not bothered with Msgbox error notices about invalid input.
It always seemed best to me to make it impossbile for user to specify invalid input, when there was a way to prevent such data entry.

I am a retired mainframe programmer who was paid to pursue a hobby for circa 50 years. Now I write programs for amusement: Magic Squares, Torus Geodesics, Fractal graphics, whatever.