J
Janelle S
I have the gotten the following VBA from previous post to insert and new line
- works great, but I want to be able to hide row (i) so people cannot insert
data into it. Is this possible? Thanks heaps in anticipation.
Public Sub ProcessData()
Const TEST_COLUMN As String = "a"
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
Application.ScreenUpdating = False
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 1 Step -1
If .Cells(i, TEST_COLUMN).Value = "add" Then
.Rows(i).Copy
.Rows(i + 1).Insert
.Cells(i + 1, "a").Delete
.Cells(i + 1, "b").Select
End If
Next i
End With
End Sub
- works great, but I want to be able to hide row (i) so people cannot insert
data into it. Is this possible? Thanks heaps in anticipation.
Public Sub ProcessData()
Const TEST_COLUMN As String = "a"
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
Application.ScreenUpdating = False
iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 1 Step -1
If .Cells(i, TEST_COLUMN).Value = "add" Then
.Rows(i).Copy
.Rows(i + 1).Insert
.Cells(i + 1, "a").Delete
.Cells(i + 1, "b").Select
End If
Next i
End With
End Sub