Question Why do I lose the value on my variables?

Shivers1029

New member
Joined
Apr 17, 2015
Messages
2
Programming Experience
Beginner
Hey there!

Before you read this, please bare in mind that I am very new to VB.net, and coding in general.
95482edbc2db15163bbc995ca1f5bd68.png

This is the code I have so far, and so some reason, after the Sub finishes, I lose all of the values I put into my different variables. Can anyone tell me why it's doing this, and what I can do to stop this from happening.

Thanks
 
What do you mean by "I lose all of the values I put into my different variables" ?
With the code you've provided the values would be retained in each of those Disk variables.
 
What do you mean by "I lose all of the values I put into my different variables" ?
With the code you've provided the values would be retained in each of those Disk variables.

That's what was confusing me. It should have been keeping the values I gave them, but it wasn't. I did end up fixing it by changing the variables to being shared. Not sure why, but it worked
 
That's what was confusing me. It should have been keeping the values I gave them, but it wasn't. I did end up fixing it by changing the variables to being shared. Not sure why, but it worked
There's definitely more going on than what you posted, would have been nice to see all of the code to know that.
 
Back
Top