Thank you all for the code snippets and links.
QB64 (and by extension QBasic) is syntactically different from the Basic dialects I've used and there are commands I am trying to type that have to be done very differently in qb64 since they don't exist or exist quite differently. The code you are posting is sometimes hard for me to follow as well since I have no prior experience with QBasic. So expect some silly questions in the future.