Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Numerical Input via an inputbox method

Sub tester2()
Dim myNum As Long
myNum = Application.InputBox("Enter a Number", Type:=2)

ActiveCell.Value = myNum
End Sub


works for me. You need to use a data type that will hold a number of that
size (for a whole number, use long).

--
Regards,
Tom Ogilvy

"RBBCPA" wrote in message
...
I am trying to write a macro with an inputbox that allows a user to input

a
number and then put that number in a given cell so that it can be used in
calculations (outside the macro). the code I am using is shown below. I
copied from a posted article on the microsoft site. the problem is that

when
i enter a number larger than 32600, i get a run-time '6' error overflow.

i
can't figure out why. i want to be able to enter numbers between 1000000

and
10000000



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numerical Input via an inputbox method Bob Phillips[_6_] Excel Programming 0 August 16th 04 07:30 PM
InputBox Method Logic Problem ExcelMonkey[_20_] Excel Programming 2 January 24th 04 04:47 AM
Cancel button in Inputbox method MiRa Excel Programming 2 November 14th 03 01:04 PM
Using Arrays in InputBox Method verizon Excel Programming 4 July 20th 03 08:14 AM
Inputbox method using type:=8 - How to Cancel? Joe 90 Excel Programming 0 July 10th 03 12:24 AM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"