Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Upgrade VBA code from 2003 to 2007 | Excel Programming | |||
Code not working since upgrade to 2007 | Excel Programming | |||
Excel acts as if scroll lock is on when it is not | Excel Discussion (Misc queries) | |||
When code runs...worksheet acts a little strange | Excel Programming | |||
How can I build a Excel Function that acts like those built-in | Excel Programming |