Changes in How Code Acts After Upgrade of Excel

Discussion in 'Excel Programming' started by magmike, Mar 29, 2014.

  1. magmike

    magmike Guest

    I just upraded from Excel 2003 to Excel 2010. Previously, the code below took a template row with formulas and conditional formatting and inserted a copy of it above the currently selected row inside a defined table. However,now, the conditional formatting doesn't carry over.

    If I do this manually, by inserting a row first, then copying the template row (located on another sheet in the workbook) and the paste it over the newly inserted row, then it acts correctly.

    Can someone help me modify the followomg code to mimick doing it manually or tell me what is wrong with mine?

    Sub Nsert_TemplateRow()
    Dim Msg, Style, Title, Response
    Msg = "This will insert a New Row ABOVE your currently selected cell. Do you wish to continue?"
    Style = vbYesNo + vbInformation
    Title = "Insert Row"

    Response = MsgBox(Msg, Style, Title)
    If Response = vbYes Then
    If Selection.Column = 1 Then

    Selection.Insert Shift:=xlDown
    Application.CutCopyMode = False

    MsgBox "You must first select a cell in column A", vbInformation, Title
    End If
    'anything else
    End If

    End Sub

    Thanks in advance for your help,
    magmike, Mar 29, 2014
    1. Advertisements

  2. magmike

    Claus Busch Guest

    Hi Mike,

    Am Sat, 29 Mar 2014 13:44:03 -0700 (PDT) schrieb magmike:
    for me it works fine. Formulas and Conditional Format is also copied.
    Check the range name if it is correctly refered.

    Claus B.
    Claus Busch, Mar 29, 2014
    1. Advertisements

  3. magmike

    GS Guest

    Also working as expected for me!


    Free usenet access at
    Classic VB Users Regroup!
    GS, Mar 29, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.