Need Help Writing/Understanding Several Scripts

Discussion in 'Visual Basic ( VB )' started by Aus_anon, Jun 19, 2011.

  1. Aus_anon

    Aus_anon New Member

    Jun 19, 2011
    Likes Received:
    Trophy Points:
    I have a couple of questions/scripts that i need to write for hw, but so far i've had no luck getting any of them to work. They are

    1.Write a script that creates a file. The script should:
    1. Ask for a folder name
    2. Ask for a filename
    3. if the file already exists, delete it
    4. ask for text to write to the file
    5. Write that text to file
    6. Save and close the file

    2.Write a function that extracts and displays characters 7 to 12 of a string that is entered from the keyboard:
    1. Place this within a script
    2. If no characters are entered, the script should termiante with an error message
    3. If the user presses either ESC or Cancel from the InputBox, the script should terminate with a different error message

    3.Write a script that displays an entered drive's serial number

    & 4. Write a script that asks for a number:
    1. Then another number, and another number, until the user entes the word "quit"
    2. The script should then display the total of the numbers entered

    Any help would be appreciated :)
    I did all my other questions without any problems , but i've been having lots of problems with those
  2. ManzZup

    ManzZup New Member

    May 9, 2009
    Likes Received:
    Trophy Points:
    Production Manager:Software @ ZONTEK
    Sri Lanka
    Home Page:
    try satrting up with the coding and post the progress so we can help
    most of these are easily achievable with the given methods in

    to start go on and google about the and io.file
    you can do the first with thoe two

    and for the second you need the substring method only

    the third one is pretty basic that you should be able to do it
    just have to check weather the input == "quit"

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice