Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6917361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:43:14+00:00 2026-05-27T09:43:14+00:00

I am building an application that accepts input entered into textboxes, then checks the

  • 0

I am building an application that accepts input entered into textboxes, then checks the input for negative values, etc. before writing it to a file. If the data does not meet the conditions, a message box pops up letting the user know. The problem I am having is that after it checks the data and displays the message box, it continues to save the input to the file anyway. How do I make it only write to the file if all the data meets my conditions? I apologize if this seems really basic, I am in my first year of a programming course!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:43:15+00:00Added an answer on May 27, 2026 at 9:43 am

    Well, you could do it like this:

    'Checks here
    If <data does not match>
         MessageBox.Show("Your data is invalid!")
         Exit Sub
    End If
    
    <code for writing to a file>
    

    “Exit Sub” will exit the current subroutine (function) and not do the code you will place behind the if-block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking into building an ASP.NET MVC application that exposes (other than the usual
I'm building an application that accepts credit card orders, but does not programatically authorize
I'm building a VB application that accepts numbers in the beginning. I want to
I am building application that required some data from iPhone's Call log(read only). The
I'm building an application that is targeting Windows, Mac and Linux soon. I was
We're currently building an application that executes a number of external tools. We often
I am considering building an application that is a blend of a dynamic language
I'm building an application that needs to run through an XML feed but I'm
I am building an application that is very similar to a shopping cart. The
I am building an application that queries a web service. The data in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.