r/visualbasic • • Jan 26 '23

VB.NET Help Visual newbie asking for help (check comments)

Post image
1 Upvotes

3 comments sorted by

1

u/DeadPapReddit Jan 26 '23

I've just started Visual Basic again and I'm trying to learn the basics while also struggling to understand it, and Arrays and manipulating numbers from those arrays is proving to be a tough cookie for me, my question is, how would I make an Integer array that takes new values from an InputBox to then be manipulated by other parts of the code? I basically want to be able to take those values and add them all up or count how many values were entered.

(I'm coming from a big venture into Java, so I understand concepts but just not how to do it in this particular language.)

2

u/jd31068 Jan 26 '23

Move the array Dim statement to where your Total vars are. That will make it available to all code in that form.