Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / January 2006

Tip: Looking for answers? Try searching our database.

Input Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dddivers - 03 Jan 2006 20:36 GMT
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.
Bob Phillips - 04 Jan 2006 11:20 GMT
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")

Signature

HTH

Bob Phillips

(remove nothere from email address if mailing direct)

> 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
[quoted text clipped - 4 lines]
> 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.
dddivers - 04 Jan 2006 17:34 GMT
Fantastic!  Thank you.

> Rather than get them to type it in, use
>
[quoted text clipped - 18 lines]
> some
> > of the code hammered out but am stuck.  Any suggestions?  Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.