+ Reply to Thread
Results 1 to 9 of 9

Macro to copy and insert down several rows in protected sheet

  1. #1
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Macro to copy and insert down several rows in protected sheet

    Hello

    I have a sheet that contains formulas and is protected (password "43215")

    I need a VBA code so that the user can select one or several rows , Insert them down WITH The formulas

    Can anyone help ?

    Thanks

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro to copy and insert down several rows in protected sheet

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    Hi

    Thanks for replying

    the above macro is giving me an error very often ( attached) error 1.png ( Automation error -the object invoked has disconnected from its clients )

    Furthermore , when the macro runs it does not do exactly what I need

    Lets say my Excel sheet (PROTECTED) has a table with 3 rows containing formulas ,like this

    AAAAA
    BBBBB
    CCCCC

    What I want is that when I select rows "A" and "B" and run the macro to have the following :

    AAAAA
    BBBBB
    AAAAA
    BBBBB
    CCCCC


    However, What I Am getting with the macro provided by Sixth sense is the following:

    AAAAA
    AAAAA
    AAAAA
    AAAAA
    AAAAA

    ... That's not exactly what I need

    Please help

    Thanks a lot

  4. #4
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    Anyone ? Please help

  5. #5
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    bumpity bumpito bumpita

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro to copy and insert down several rows in protected sheet

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    Ok

    Please find attached the Sample work book (Test_Sheet) . The password for the excel sheet is "1234"

    Also please find screenshots of what I want the macro to do

    The "Before" screenshot is the sheet before I run the macro .

    The "After" screenshot is the expected result

    The VBA code should allow the user to select one or several rows , Insert them down WITH The formulas


    At the moment I have a Code ( linked to button "insert selection" ) , but its making the excel crash sometimes and give the following error
    Please Login or Register  to view this content.
    Run-time error ' -21474178848 (80010108)'

    Method 'Insert' of object 'Range' failed


    Please if someone could just tell me why the excel crashes , or give me a code that would work without crashing excel I would be much obliged
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    Are the Pictures "before" and "after" appearing ? Trying again


    BEFORE.jpgAFTER.jpg


    By the way the rows I want to insert down in the test sheet are rows 11,12,13 and 14 ( I select all 4 of these rows then run the macro and they are inserted down )
    Attached Images Attached Images
    Last edited by Sardokar21; 01-27-2015 at 04:01 AM.

  9. #9
    Registered User
    Join Date
    01-07-2015
    Location
    Beirut,Lebanon
    MS-Off Ver
    2013
    Posts
    12

    Re: Macro to copy and insert down several rows in protected sheet

    Awwww ... come on ... no one ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Insert row and copy formula in protected sheet
    By impresxy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2017, 02:57 AM
  2. insert rows with the formula in a protected sheet
    By meghachaudhary in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 09:48 PM
  3. Insert rows in a protected sheet
    By aneshree in forum Excel General
    Replies: 7
    Last Post: 12-09-2013, 11:31 AM
  4. Replies: 1
    Last Post: 05-11-2013, 02:58 AM
  5. Copy and paste insert rows with protected cells in protected worksheet
    By excel_gecko in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 05:50 PM

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