Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User Input Of A Number


Chuckles123 Wrote:
Looking for guidance on constructing code to pause macro and have use
input a 2- or 3-digit number, and then macro continuing. Also, i
would be useful for macro, after results are displayed in spreadsheet
to loop back to input option.
Thanks in advance.
Chuckles123


Hi Chuckles123

What you need to use is the Application.Inputbox function.

Have a look in your help files .....

example something like this

Sub Tester()
Dim Result

Again:
Result = Application.InputBox("Enter 2 or 3 didgit number", Type:=1)
If Result = False Then Exit Sub
If Len(Result) 3 Or Len(Result) < 2 Then GoTo Again

MsgBox Result

End Su

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=27517

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
show a number of rows based upon user input P_R Excel Discussion (Misc queries) 1 April 22nd 08 08:03 AM
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
Change color of cell after user has input a number F7772 Excel Discussion (Misc queries) 3 August 29th 05 09:20 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 02:46 PM.

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"