M
magmike
I have a command button when pressed inserts a predesigned rowabove the selection. That row has conditional formatting built in. If I were to copy that row and then Insert the copied row manually, the conditional formatting would carry over. But when pressing my button, everything but the conditional formatting carries over.
Any ideas?
Sub Nsert_TemplateRow()
Const sMsg$ = "This will insert a New Row" _
& " ABOVE your currently selected cell." _
& vbLf & vbLf & " Do you wish to continue?"
Const lStyle& = vbYesNo + vbInformation
Const sTitle$ = "Insert Row"
If (MsgBox(sMsg, lStyle, sTitle) = vbYes) Then
Sheets("Sheet1").Range("New_Row").Copy
Cells(ActiveCell.Row, 1).Insert Shift:=xlDown
Application.CutCopyMode = False
End If 'vAns
End Sub
Thanks in advance for your help,
magmike
Any ideas?
Sub Nsert_TemplateRow()
Const sMsg$ = "This will insert a New Row" _
& " ABOVE your currently selected cell." _
& vbLf & vbLf & " Do you wish to continue?"
Const lStyle& = vbYesNo + vbInformation
Const sTitle$ = "Insert Row"
If (MsgBox(sMsg, lStyle, sTitle) = vbYes) Then
Sheets("Sheet1").Range("New_Row").Copy
Cells(ActiveCell.Row, 1).Insert Shift:=xlDown
Application.CutCopyMode = False
End If 'vAns
End Sub
Thanks in advance for your help,
magmike