LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Changes in How Code Acts After Upgrade of Excel

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade VBA code from 2003 to 2007 lmzhuee Excel Programming 3 August 16th 09 03:35 PM
Code not working since upgrade to 2007 Terry K Excel Programming 2 January 4th 08 07:39 PM
Excel acts as if scroll lock is on when it is not Hyehats Excel Discussion (Misc queries) 4 October 18th 05 01:33 PM
When code runs...worksheet acts a little strange KimberlyC Excel Programming 3 April 1st 05 04:49 PM
How can I build a Excel Function that acts like those built-in wlh Excel Programming 1 November 27th 03 08:18 AM


All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"