![]() |
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. |
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. |
All times are GMT +1. The time now is 12:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com