Thanks Ken. I am studying for a Intro to VB exam and your videos are a great supplement to my professor, who is great but difficult to understand sometimes.
@KenSwartwout11 жыл бұрын
Thanks for the feedback! A For/Next loop is just a different syntax - it would be less lines of code. You just have to familiarize yourself with the For/Next syntax. Essentially, the counter is declared and incremented on the same line as the For statement. Your condition will be the same - you will compare the counter with the list box size. My video on For/Next should help - sorry I can't post a link.
@KenSwartwout11 жыл бұрын
The solution would be similar to this example. The difference would be that you calculate a running total as opposed to a running maximum. You would iterate through the list box in the same fashion and examine each item but replace comparisons with addition. Good luck!
@LuizSlivinski7 жыл бұрын
Thank you very much Ken. Your explanation of your logic was very helpful. It helped me a lot. Thank you very much! I just don't know how you would do it in a fewer lines (like you mentioned in the video) than the example you used here using For/Next loop.
@HussainAlMarkhi11 жыл бұрын
I just came here to say thank you so much I have pass my exam easily and there was a question similar to this one so it was really easy to me , it really was something different which is how to check the max in 4 listbox but I have made one and put it in a function and just copying and changing the listbox name and it's work perfectly :D thank you so much
@Mithfir11 жыл бұрын
Many thanks, I'm just starting out with VB and it really helped me out. Subbed!
@KenSwartwout11 жыл бұрын
Glad to hear it. I am working on creating a better library of content.
@KenSwartwout11 жыл бұрын
Thanks for the feedback. Glad to help!
@ameer10120210 жыл бұрын
Thanks a lot ! you made things much more easier for me!
@spangleryamish75294 жыл бұрын
can you show how we could find the number of grades above the average
@bmanning198911 жыл бұрын
I am trying to add numbers to a list box and sort them min and max. Can you help me?
@RickyFuto11 жыл бұрын
How can I sum all items in a listbox using While Loop? I was able to do it with the For Each method but I am asked to do it using While loop.
@notsonathan9 жыл бұрын
dude i have a problem , the code is correct, but whenever i click the buttom max.. It doesn't recognize the last number i put in the list.
@ghostxshot4 жыл бұрын
5 years later, where he said add the -1, don't do that.
@notsonathan9 жыл бұрын
Can you also put the code for finding the average? Thanks :)
@KenSwartwout11 жыл бұрын
You are welcome.
@rjc1319 жыл бұрын
I am learning console apps, Could you do one that takes 1 penny the first day 2 pennies the second day 4 pennies the third day 8 on the fourth and so on, but have to ask the user to input the number of days and the final amount has to be in dollars and cents format...... if you could do that it would be awesome, Thank you
@inyuashathizz9 жыл бұрын
+Robert Carlson Public Class frmSumOfNumbers Private Sub btnEnterNumbers_Click(sender As Object, e As EventArgs) Handles btnEnterNumbers.Click 'INPUT 'Declare Variables Dim intSum As Integer Dim intNumber As Integer 'Use number enetered by user Try intNumber = InputBox("Input a Positive Value:", "Input Needed", "10") 'Displays warning if user inputs value 0, or below If intNumber
@richardhill41363 жыл бұрын
How I would love for him to teach me one on one in VB