#1   Report Post  
Posted to microsoft.public.excel.setup
dddivers
 
Posts: n/a
Default Input Box

I'm trying to create a VBA scenario in Excel 2003 where an Input Box appears
asking the user to type a desired cell range (e.g. A1:B6) from a specified
worksheet (e.g. Sheet1) in the Input Box, and then have the values that sit
in whatever cell address range the user typed in the Input Box to copy and
paste to another specified worksheet (e.g. Sheet2). In other words, if the
user types A1:B6 in the Input Box, the VBA will copy and paste the values in
cells A1 thru B6 in sheet 1 over to sheet2 starting in cell A4. I have some
of the code hammered out but am stuck. Any suggestions? Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.setup
Bob Phillips
 
Posts: n/a
Default Input Box

Rather than get them to type it in, use

Set rng = Application.Inputbox("Select range",Type:=8)

which allows them to select the range with the mouse. You can then simply
copy that range

rng.Copy Worksheets("other").Range"A1")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"dddivers" wrote in message
...
I'm trying to create a VBA scenario in Excel 2003 where an Input Box

appears
asking the user to type a desired cell range (e.g. A1:B6) from a specified
worksheet (e.g. Sheet1) in the Input Box, and then have the values that

sit
in whatever cell address range the user typed in the Input Box to copy and
paste to another specified worksheet (e.g. Sheet2). In other words, if

the
user types A1:B6 in the Input Box, the VBA will copy and paste the values

in
cells A1 thru B6 in sheet 1 over to sheet2 starting in cell A4. I have

some
of the code hammered out but am stuck. Any suggestions? Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.setup
dddivers
 
Posts: n/a
Default Input Box

Fantastic! Thank you.

"Bob Phillips" wrote:

Rather than get them to type it in, use

Set rng = Application.Inputbox("Select range",Type:=8)

which allows them to select the range with the mouse. You can then simply
copy that range

rng.Copy Worksheets("other").Range"A1")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"dddivers" wrote in message
...
I'm trying to create a VBA scenario in Excel 2003 where an Input Box

appears
asking the user to type a desired cell range (e.g. A1:B6) from a specified
worksheet (e.g. Sheet1) in the Input Box, and then have the values that

sit
in whatever cell address range the user typed in the Input Box to copy and
paste to another specified worksheet (e.g. Sheet2). In other words, if

the
user types A1:B6 in the Input Box, the VBA will copy and paste the values

in
cells A1 thru B6 in sheet 1 over to sheet2 starting in cell A4. I have

some
of the code hammered out but am stuck. Any suggestions? Thank you.




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
***Two Input Data Tables*** rbekka Excel Discussion (Misc queries) 1 October 21st 05 02:05 PM
input box Monty Excel Discussion (Misc queries) 2 October 7th 05 08:33 AM
Input cell reference is not valid (One Variable Data Table) Dottore Excel Worksheet Functions 9 September 1st 05 03:05 PM
Input Form vba help mdalzell Excel Discussion (Misc queries) 0 April 8th 05 03:57 PM
can you input time (hh:mm:ss) without having to input the colon i. Lexicon Excel Discussion (Misc queries) 4 January 11th 05 02:09 PM


All times are GMT +1. The time now is 12:33 AM.

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

About Us

"It's about Microsoft Excel"