How to arrange a set of number?

How do I set a variable number in visual basic?

  • I have an app that I made that refreshes a page according to user set definitions. The user selects the seconds, and the timer refreshes the webbrowser1 according to how many seconds there are. It loops this action. I want to put a checkbox next to the seconds that will say "Enable Variable Time" and a NumericUpDown that will have the seconds that the original time will vary. For example, I have the original NumericUpDown1.Text set to 60 (seconds). I check the "Enable Variable Time" and set a 10 second variable in NumericUpDown2.Text. After doing this, the page will refresh every 60 seconds +/- the 10 second variable (randomly any number within the range), i.e. 60 seconds will now be 61 seconds or 69 seconds, or 54 seconds, etc... It just creates a user set variable so that the original seconds vary at a max of, in this example, 10 seconds. I do not want it to be 10 seconds exactly, but to be +/- any number within the range of 10. Oh, and I want this to change every time it refreshes, so that it doesn't use the same variable setting over and over, i.e. 60 seconds and a variable of 10 seconds, becomes 63 seconds every time... I do not want this. It needs to change every time, otherwise it would be pointless. 60 seconds and a variable of 10 seconds (first refresh) becomes 63 seconds. (Second Refresh) 60 seconds and a variable of 10 seconds becomes (at random for example:) 69 seconds, and so on and so forth. I hope I am making some sense. I'm kind of new to visual basic, so keep that in mind. I can learn what to do, just use terms that I most likely would know. Thanks!

  • Answer:

    Refresh = 60 + int(rnd()*10)

JedtheMa... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.