1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

input box error when using double as input

Discussion in 'Business Applications' started by spooky1, Apr 30, 2013.

Thread Status:
Not open for further replies.
  1. spooky1

    spooky1 Thread Starter

    Joined:
    Jan 29, 2010
    Messages:
    126
    Dim piesky As Double

    On Error GoTo Cancelled - On Error resume next

    piesky = InputBox("amount to find", , 196.96)
    onerror goto 0
    If IsError(piesky) Then Exit Sub Else MsgBox 77
    If IsNumeric(piesky) Then v = 1 Else Exit Sub
    If piesky = "false" Then Exit Sub
    If piesky = "" Then Exit Sub
    If piesky = 0 Then Exit Sub

    piesky is used to find row number

    In blue is the code I tried. Nothing seems to work and if cancelled or blank entry gives an error

    Why am I diming the input as Double? Cause nothing else works to find a $196.96 amount in a column
    with my program except the double. Column is formatted to accountancy.
     
  2. spooky1

    spooky1 Thread Starter

    Joined:
    Jan 29, 2010
    Messages:
    126
    Okay guys, found a solution, the best I could with my limited knowledge.

    dim wonky as double
    userinput=inputbox (" xxxxxxx")
    if userinput="" then exit sub
    wonky=userinput

    this then finds sums in a col like 99.99 which if the input is normal or currency or whatever
    does not work in my program. Perhaps there is another dim function that can be used
    that does not require all the above
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1097458

  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