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

  • Home
  • SEARCH
  • 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 9052173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:06:01+00:00 2026-06-16T13:06:01+00:00

Example code: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

  • 0

Example code:

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show(Val(TextBox1.Text), "Val of text input")
    End Sub
End Class

Anyhow out of simple curiosity I am wondering why it does this?

From some other posts & personal experience I know VAL(expression) isn’t recommended & is just a legacy function from VB6 days. I tried every other alphabet letter & none caused this issue, I also tried a couple variations & it appears any number after d or e add that many zeros (seems like its multiplying). I understand that the value may be overflowing the data-type VAL placed it in. I see e is the default variable for the sub-procedure, so that’s probably why, but I can’t figure out any logic to d.

Please make it noted I am very new to VB.NET, just got down with a college course & haven’t built any actual apps. Furthermore our teacher seemingly didn’t teach us error-handling which I am very interested in, as my current work situation has some rather old apps that have issues. Would also like any recommended error-handling articles/readings

  • 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-06-16T13:06:03+00:00Added an answer on June 16, 2026 at 1:06 pm

    The Val() function “returns the numbers contained in a string as a numeric value of appropriate type” (cit. from http://msdn.microsoft.com/en-us/library/k7beh1x9(v=vs.71).aspx).
    If you set a string value like 5exxx it means 5 * 10^xxx; but pay attention: the function returns a double and double goes approximately from ±5.0 x 10^-324 to ±1.7 x 10^308; so, for example, the string 5e307 works but 5e308 doesn’t, returning overflow.
    If you use some other letters “function stops reading the string at the first character it cannot recognize as part of a number”, so it doesn’t return overflow.

    I hope it was helpful. Have a nice new year!

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

Sidebar

Related Questions

Example code: #include <cstdlib> #include <iostream> using namespace std; class A { public: A(int
Say suppose I have the following Java code. public class Example { public static
Best explained with code I think, this is just a simple example: public class
Here is code example class A{ int i; public: A(int i) : i(i) {}
I want to keep my line inside my circle. My code: Public Class Form1
Beginner question. How come I can do this: Public Class Form1 Private StudentsInMyRoom As
All the code examples always use base() as follows class A { public A()
Here's a contrived example of my code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
The code is also at https://github.com/timp21337/java-generics-example package a; import java.util.List; public interface Container<T> {
just had a walkthrough in class and the example code our teacher gave us

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.