[Help] Visual Basic menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Roger Fang's Avatar Banned
    Reputation
    17
    Join Date
    Aug 2008
    Posts
    113
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Visual Basic

    Hello, I have a few things I want to be able to do on Visual Basic but I am not able to. I am currently using Microsoft Visual Basic 2008. This is what I would like to know.

    I am trying to make a program which is going to have a textbox which only accepts numbers as the input but do not know how this may be done.

    I am also wanting to know how to make in if...then rule for something not being equal to something. I am familiar with this in other languages as:

    Example:

    "If X != Y Then"

    These are the only issues I need solving reputation will be given to answers that have helped me to learn about how to do these functions as it will greatly help me in producing new programs.

    [Help] Visual Basic
  2. #2
    Murdok's Avatar Member
    Reputation
    34
    Join Date
    Oct 2007
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for visual it is:

    If textbox1.text = "hello" then

    Else

    End if

    and for checking if the input is numbers

    In visual basics 6 you would use the isnumeric statement like

    Code:
    If isnumeric(textbox1.text) then
     msgbox("numeric")
    Else
     msgbox("not numeric")
    End if
    Not sure it's the same in 2008 but it should be

  3. #3
    Fenryr's Avatar Member
    Reputation
    58
    Join Date
    Mar 2007
    Posts
    114
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To make a conditional (If...then) statement for not equal you use '<>' for example:
    Code:
            If TextBox1.Text <> 5 Then
                MsgBox("Not 5")
            Else
                MsgBox("Is five")
            End If

  4. #4
    Roger Fang's Avatar Banned
    Reputation
    17
    Join Date
    Aug 2008
    Posts
    113
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Fenryr thats what I was looking for.

  5. #5
    Bakami's Avatar Banned
    Reputation
    7
    Join Date
    Jan 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you can use something like this

    Val(Text1.text)

    It allows only for a integer to be used. Any type of string will be ignored.

Similar Threads

  1. [HELP] Visual Basic 2010 Random gernerated from name?
    By HighlineTV in forum Programming
    Replies: 1
    Last Post: 12-12-2016, 10:55 PM
  2. Custom Launcher Help, Using VB (Visual Basics)
    By turbocookie in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 03-01-2010, 08:53 AM
  3. Help Visual Basic Urgent
    By supereuropa in forum Programming
    Replies: 2
    Last Post: 09-20-2009, 11:08 AM
  4. Visual Basics [Need help]
    By yunlek in forum World of Warcraft Guides
    Replies: 6
    Last Post: 01-14-2009, 01:11 AM
  5. Help! Visual Basic
    By dUcKyDrEaMeRx3 in forum Programming
    Replies: 2
    Last Post: 12-16-2008, 11:57 AM
All times are GMT -5. The time now is 06:46 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search