Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Requesting user input for a number?

I found code in the archives that works in that it requests a number and
then inputs that number into a cell. However, it doesn't have a cancel and
I haven't had luck getting anything to work for that. Since this code isn't
specifically for this simple purpose even though I was able to modify it,
however, it is probably better to start from scratch with code specifically
for this purpose.

So, the box should request the user input a number cell B4 but should have
nothing happen if the user presses cancel.

Thanks much! :oD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Requesting user input for a number?

Dim ans As Variant

ans = InputBox("add number")
If ans < "" Then
Range("M10").Value = ans
End If


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"StargateFanFromWork" wrote in message
...
I found code in the archives that works in that it requests a number and
then inputs that number into a cell. However, it doesn't have a cancel

and
I haven't had luck getting anything to work for that. Since this code

isn't
specifically for this simple purpose even though I was able to modify it,
however, it is probably better to start from scratch with code

specifically
for this purpose.

So, the box should request the user input a number cell B4 but should have
nothing happen if the user presses cancel.

Thanks much! :oD




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
Example of input or msg box requesting TWO pieces of info? StargateFan[_3_] Excel Programming 2 March 25th 06 06:06 PM
User Input Of A Number Chuckles123[_50_] Excel Programming 1 November 12th 04 02:49 AM
User Input Of A Number Chuckles123[_49_] Excel Programming 1 November 12th 04 01:42 AM
User Input Of A Number Chuckles123[_48_] Excel Programming 0 November 11th 04 05:27 AM
User Input Of A Number Chuckles123[_43_] Excel Programming 2 November 4th 04 06:42 AM


All times are GMT +1. The time now is 03:57 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"