Results 1 to 3 of 3
  1. #1
    bbrazeau is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    101

    inputbox that accepts numbers

    Is there an "Inputbox" type function that accepts integers. I want the user to input a number and use it in VBA code.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You can use the InputBox for numbers. What is the code you want to use it in? You can use something like:

    Code:
    Dim intX As Integer
     
     
    intX = Val(InputBox("Enter Number"))
    Last edited by boblarson; 10-31-2011 at 02:26 PM. Reason: changed from NZ to Val

  3. #3
    bbrazeau is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    101

    inputbox that accepts numbers

    Hi Bob, Thank you. That works, and is simple to impliment.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Type mismatch from InputBox
    By sephiroth2906 in forum Programming
    Replies: 2
    Last Post: 09-15-2011, 06:59 AM
  2. Inputbox on programming? :(
    By radicrains in forum Programming
    Replies: 7
    Last Post: 11-05-2010, 10:58 PM
  3. numbers
    By Balen in forum Access
    Replies: 1
    Last Post: 08-17-2010, 05:16 PM
  4. Random numbers
    By Gator777 in forum Access
    Replies: 3
    Last Post: 08-12-2009, 10:04 AM
  5. Query & InputBox
    By RemusRigo in forum Queries
    Replies: 1
    Last Post: 03-25-2009, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums