r/visualbasic • u/Dennis13631 • Jan 12 '20
Need a bit help
So ive done a program and my teacher just casually said its spagheti code and i need to somehow fix it but im totally out of idea how to do that so i would appreciate all help i can get from here!
Here is the code:
https://pastebin.com/qzPbMXh8
6
Upvotes
2
u/LondonPilot Jan 12 '20
No, I mean different modules - which basically means a different file.
Again, I’m not at my computer, so this may not be exactly right, but if you right click on the project in solution explorer, then choose Add, you should get an option to add a module.
The module has a name. Your module that you already have is called Module1 - it says that on line 2 of your code. You can access things in other modules from your main module.
There’s a guide to modules here which looks quite good - it’s based on Windows Forms but should still tell you everything you need to know.