Sub insertrow(rownum)
Rows(rownum).Select
Selection.Insert Shift:=xlDown
Range("A" & rownum & ":M" & rownum).Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A" & rownum).Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With
End Sub
Usage:
Sub insteszt()
rowvar=5
Call insertrow(rowvar)
End Sub
Regards,
Stefi
€˛FIRSTROUNDKO via OfficeKB.com€¯ ezt Ć*rta:
H!!
Is it possible to name the below code extract and recall it by the name?
Rows("5:5").Select
Selection.Insert Shift:=xlDown
Range("A5:M5").Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A5").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With
Thanks in advance
Darren
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200609/1