Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Input box Copy Paste Range

Hello all. I know a bit of vba, just lost a bit of it since I dont use it
much. This should be easy though

This is what I'm looking for. When the macro is launched, I want it to pop
up and ask for Range 1, that range is inputted, which is a range that
changes, that's why I want it to ask. Then ask for Range 2, that is
inputted, if they have to be done seperately, then fine. but once it ask, I
want it to copy range B3:B9 and paste it into the inputted range that I
entered into the input box. How's that, I knew it would be easy.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Input box Copy Paste Range

Try something like

Dim Rng1 As Range
Dim Rng2 As Range
On Error Resume Next
Set Rng1 = Application.InputBox(prompt:="Select a range.",
Type:=8)
If Rng1 Is Nothing Then
Exit Sub
End If
Set Rng2 = Application.InputBox(prompt:="Select a range.",
Type:=8)
If Rng2 Is Nothing Then
Exit Sub
End If
'
' do the rest of your copy
'


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JavyD" wrote in message
...
Hello all. I know a bit of vba, just lost a bit of it since I
dont use it
much. This should be easy though

This is what I'm looking for. When the macro is launched, I
want it to pop
up and ask for Range 1, that range is inputted, which is a
range that
changes, that's why I want it to ask. Then ask for Range 2,
that is
inputted, if they have to be done seperately, then fine. but
once it ask, I
want it to copy range B3:B9 and paste it into the inputted
range that I
entered into the input box. How's that, I knew it would be
easy.



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
copy range and paste into every 3rd cell of new range thomsonpa New Users to Excel 4 December 3rd 07 01:47 PM
Drop Down--How do I copy and update cell link/input range MaryinCT Excel Discussion (Misc queries) 1 November 2nd 07 01:13 AM
user input decides cell copy range beatrice25 Excel Discussion (Misc queries) 0 May 17th 06 06:51 PM
Copy/Paste Worksheet to last and rename with input box for value. bigwheel[_2_] Excel Programming 0 September 7th 04 10:17 PM
Copy/Paste Worksheet to last and rename with input box for value. Dave Peterson[_3_] Excel Programming 2 September 7th 04 08:59 PM


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