- I need to copy a range from a worksheet (sheet5.)
- There are 30 named ranges MOD_01 through MOD_30
- I need a macro that copies the range from sheet5. to sheet1. (Easy I know…that part I can do!)
- However, I do not want to make 30 buttons (which is the only way I could do it at my current level).
- Instead need one macro that opens a dialogue box which allows me to select between 01 and 30 (preferable a dropdown between 01-30).
- The number returned would be concatenated with the (MOD_&‘returned number’) to define which range needs to be copied.
- The copied range needs to be pasted to
Sheets("Gantt Chart").Range("A8").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
- I honestly don’t know where to start with this one.
- I have attached a sample file. In this I only have named ranges MOD_25 through MOD_30. The sample file shows a simple macro to copy and paste one of the ranges (mod_30) with no dialogue box but that doesn't really help much...
Sub AddRange()
Application.ScreenUpdating = False
Sheet5.Unprotect
Range("MOD_30").Copy
Sheets("Gantt Chart").Range("A8").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
Sheet5.protect
Application.ScreenUpdating = True
End Sub
Any help will be greatly appreciated!
Thanks!!!!
Bookmarks