0
2つの列の値を指定して複数の行を挿入するコードがあります。私はいくつかの色の新しい挿入行を強調表示するコードを追加する方法がわかりません。挿入された行の挿入と強調表示
Sub Multiplerows()
Dim rng As Integer, k As Integer
Dim attrib As String
Dim BMI As String
Dim rRange As Range
Dim salesID As Long, salesMkt As String
Set rRange = Selection
On Error Resume Next
rng = InputBox("Enter number:.")
item = InputBox("Enter name of the Item:.")
subject = InputBox("Enter name of the sub item:.")
'If rng = 0 Then Exit Sub
For k = 1 To rng
Rows(rRange.Row).Insert Shift:=xlDown
Next k
For k = rng To 1 Step -1
Cells(rRange.Row - k, 10) = item
Cells(rRange.Row - k, 8) = subject
Next k
End Sub