Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Input box and assigning to a variable.

In Excel Programming, I want the user to punch in the field through input box
and the same is assigned to a variable. I don't know to use input box how can
i do that? and please inform me to assigning to a variable.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Input box and assigning to a variable.

dim anyR as range
on error resume next
set anyR = application.inputbox("select a range", type:=8)
if anyR is nothing then exit sub

Bob Flanagan
Macro Systems
144 Dewberry Drive
Hockessin, Delaware, U.S. 19707

Phone: 302-234-9857, cell 302-584-1771
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Vijay Kotian" wrote in message
...
In Excel Programming, I want the user to punch in the field through input
box
and the same is assigned to a variable. I don't know to use input box how
can
i do that? and please inform me to assigning to a variable.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default Input box and assigning to a variable.

On Mar 16, 9:03 am, Vijay Kotian
wrote:
In Excel Programming, I want the user to punch in the field through input box
and the same is assigned to a variable. I don't know to use input box how can
i do that? and please inform me to assigning to a variable.


here is another simple example

Sub test()
ans = InputBox(" Enter Data here", "My Input Box")
MsgBox ans

End Sub

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
Assigning values to a variable set John A[_2_] Excel Discussion (Misc queries) 1 April 23rd 10 08:20 PM
Assigning a variable Zack Excel Worksheet Functions 3 December 11th 08 07:00 PM
Assigning a min to a variable Ed Excel Programming 3 August 3rd 06 06:05 PM
Assigning a variable a value from a Cell in VBA [email protected] Excel Programming 3 February 15th 06 06:26 PM
Assigning a row to a variable Todd Excel Programming 4 June 10th 04 06:49 PM


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