Results 1 to 4 of 4

Dialogue box needed to copy range

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Dialogue box needed to copy range

    - 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!!!!
    Attached Files Attached Files
    Last edited by yunesm; 04-08-2010 at 06:20 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1