VB Problems

Discussion in '.NET' started by Timwaterbury1, Nov 14, 2011.

  1. Timwaterbury1

    Timwaterbury1

    Joined:
    Nov 14, 2011
    Messages:
    3
    Likes Received:
    0
    I am having problems with my script. I am trying to do an assignment in class. I know that I have everything there, I just cannot get it to run properly. Any assistance is appreciated.
     
    Timwaterbury1, Nov 14, 2011
    #1
    1. Advertisements

  2. Timwaterbury1

    Timwaterbury1

    Joined:
    Nov 14, 2011
    Messages:
    3
    Likes Received:
    0
    Here is my script.....

    ' This initialize a 2-dimension array
    ' of IP Address. The first index +100
    ' is the room# and the second index+1
    ' is the computer# in the room.
    dim ipAddress(5,3)
    ipAddress(0,0)="192.168.10.11"
    ipAddress(0,1)="192.168.10.12"
    ipAddress(0,2)="192.168.10.13"
    ipAddress(0,3)="192.168.10.14"
    ipAddress(1,0)="192.168.10.19"
    ipAddress(1,1)="192.168.10.20"
    ipAddress(1,2)="192.168.10.21"
    ipAddress(1,3)="192.168.10.22"
    ipAddress(2,0)="192.168.10.27"
    ipAddress(2,1)="192.168.10.28"
    ipAddress(2,2)="192.168.10.29"
    ipAddress(2,3)="192.168.10.30"
    ipAddress(3,0)="192.168.10.35"
    ipAddress(3,1)="192.168.10.36"
    ipAddress(3,2)="192.168.10.37"
    ipAddress(3,3)="192.168.10.38"
    ipAddress(4,0)="192.168.10.43"
    ipAddress(4,1)="192.168.10.44"
    ipAddress(4,2)="192.168.10.45"
    ipAddress(4,3)="192.168.10.46"
    ipAddress(5,0)="192.168.10.51"
    ipAddress(5,1)="192.168.10.52"
    ipAddress(5,2)="192.168.10.53"
    ipAddress(5,3)="192.168.10.54"

    ' Define program vaiables
    roomStr=""
    compStr=""
    room=0
    computer=0

    Do
    Display Prompt “Please Enter the Room Number (100-105) ...... “
    Get StdIn Console Input and assign string value to roomStr
    If intval(roomStr)<100 Or intval(roomStr)>105
    Use StdOut to Beep Speaker twice with chr(7)
    Display ErrMsg “Error, 100 to 105 Only!!!”
    else
    room = inval(roomStr)-100
    endif
    While intval(roomStr)<100 OR intval(roomStr)>105


    Do
    Display Prompt “Please Enter the Computer Number (1-4) ...... “
    Get StdIn Console Input and assign string value to compStr
    If intval(compStr)<1 Or intval(compStr)>4
    Use StdOut to Beep Speaker twice with chr(7)
    Display ErrMsg “Error, 1 to 4 Only!!!”
    else
    room = inval(compStr)-1
    endif
    While intval(compStr)<1 OR intval(compStr)>105

    Display the message “ The IP Address in Room ### for computer # is ###.###.##.##:

    ' Display All IP Address Y/N?
    Do
    Display Message
    "Do you wish to Display all of the IP Addresses (Y/N) ..... "
    Get User Response and assign it to variable ans
    If ans NOT "Y" & "y" & "N" & "n" Then
    Beep Speaker Twice
    Display Msg "Error, Y,y,N,n response Only!!!"
    EndIf
    While ans NOT "Y" & "y" & "N" & "n"

    If ans is "Y" OR ans is "y" Then
    For room = 0 to 5
    For computer = 0 to 3
    Display "The IP Address in Room " toString(room+100) “for Computer "
    toString(computer+1) " is " ipAddress(room,computer)
    EndFor
    EndFor
    EndIf
     
    Timwaterbury1, Nov 14, 2011
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Srinivas Kanakapally [MSFT]

    RE: Vs.net Server Explorer Diagram Problems

    Srinivas Kanakapally [MSFT], Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,457
    Srinivas Kanakapally [MSFT]
    Jul 8, 2003
  2. BestNews
    Replies:
    0
    Views:
    3,445
    BestNews
    Aug 20, 2003
  3. James

    Problems with .Net IDE

    James, Nov 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    540
    James
    Nov 26, 2003
  4. jason@cyberpine.com
    Replies:
    3
    Views:
    2,249
    Norman Yuan
    Dec 10, 2003
  5. Trev Hunter

    Focus Problems with MDI child forms

    Trev Hunter, Feb 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,008
    Trev Hunter
    Feb 2, 2004
  6. Susan Baker
    Replies:
    2
    Views:
    1,189
    kelvSYC
    Jun 26, 2005
  7. Shelly

    Problems, problems for newbie

    Shelly, Sep 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,577
    Shelly
    Sep 3, 2007
  8. Sak Na rede
    Replies:
    0
    Views:
    627
    Sak Na rede
    Jan 30, 2009
Loading...