Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Class frmproject5 Inherits System.Windows.Forms.Form Dim intNumberToGuess As Long Dim previousGuesses As New System.Collections.Hashtable Private Sub Button1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguess.Click Dim intGuess As Long Dim UpperBound As Long Dim LowerBound As Long If IsNumeric(txtguess.Text) Then intGuess = CLng(txtguess.Text) Else MsgBox("Enter a number into the textbox!") End If Update() If Not (previousGuesses(intGuess) Is Nothing) Then lblinfo.Text() = "youve already tried this number - try again" MsgBox("youve already tried this number - try again") Else If intGuess < intNumberToGuess Then lblinfo.Text() = "Too Low!" MsgBox("Number is Too Low - Have another go!") ElseIf intGuess > intNumberToGuess Then lblinfo.Text = "Too High!" MsgBox("Number is Too High - Have another go!") ElseIf intGuess = intNumberToGuess Then lblinfo.Text = "You've Got It!" MsgBox("Well Done - You've worked out the random number - Now have another go!") intNumberToGuess = Int((UpperBound - LowerBound + 100) * Rnd() + LowerBound) End If 'Add the numbers guessed into the listbox listguess.Items.Add(txtguess.Text) previousGuesses(intGuess) = intGuess End If End Sub Private Sub btnHnowToPlay_Click() MsgBox("Type a number between 0 and 100 into the box labeled Type Guess Here. The program will generate a random number and will tell you if you've gone to high or to low, keep guessing until you are CORRECT! but you only have 6 guesses.") End Sub Private Sub cmdReset_Click() txtguess.Text = "" ' listguess.clear() lblinfo.Text = "" btnguess.Enabled = False Randomize() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim intNumberToGuess As Long Dim UpperBound As Long Dim LowerBound As Long Randomize() intNumberToGuess = Int((UpperBound - LowerBound + 100) * Rnd() + LowerBound) End Sub End Class
|Saving history changes to sub form||4||49|
|Access Object Property from VBA Module in Excel 2010||2||37|
|VB 6 error 5 in windows 10 but not in XP||7||64|
|Export Data to Different .csv Files||26||115|