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

    Range("New_Row").Copy
    Selection.Insert Shift:=xlDown
    Application.CutCopyMode = False

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

    End Sub

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

  2. magmike

    Claus Busch Guest

    Hi Mike,

    Am Sat, 29 Mar 2014 13:44:03 -0700 (PDT) schrieb magmike:

    > 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.


    for me it works fine. Formulas and Conditional Format is also copied.
    Check the range name if it is correctly refered.


    Regards
    Claus B.
    --
    Vista Ultimate SP2 / Windows7 SP1
    Office 2007 Ultimate SP3 / 2010 Professional
     
    Claus Busch, Mar 29, 2014
    #2
    1. Advertisements

  3. magmike

    GS Guest

    Also working as expected for me!

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion
     
    GS, Mar 29, 2014
    #3
    1. Advertisements

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.
Similar Threads
  1. Robert Chapman

    SendKeys {Enter} acts like Return rather than Enter

    Robert Chapman, Aug 6, 2003, in forum: Excel Programming
    Replies:
    6
    Views:
    142
    Tom Ogilvy
    Aug 6, 2003
  2. wlh
    Replies:
    1
    Views:
    122
    Bill Manville
    Nov 27, 2003
  3. pH7
    Replies:
    1
    Views:
    84
  4. KimberlyC

    When code runs...worksheet acts a little strange

    KimberlyC, Apr 1, 2005, in forum: Excel Programming
    Replies:
    3
    Views:
    115
    JulieD
    Apr 1, 2005
  5. Ken Shaffer

    Scrollbar single click acts like click and hold

    Ken Shaffer, Dec 5, 2005, in forum: Excel Programming
    Replies:
    0
    Views:
    110
    Ken Shaffer
    Dec 5, 2005
  6. Ronald Dodge

    Background Calculation acts as though it's disabled

    Ronald Dodge, Aug 13, 2007, in forum: Excel Programming
    Replies:
    0
    Views:
    93
    Ronald Dodge
    Aug 13, 2007
  7. Replies:
    4
    Views:
    132
  8. jc
    Replies:
    24
    Views:
    216
Loading...