Hello all,
What I am searching for is how to have a user insert text using an input box into the row they just inserted via input box.
An input box asks user which row to insert new row.
then an input asks what text to input into that row on column 3.
here is the code im using to input new row, found this online and it works great.
<code>
Private Sub CommandButton7_Click()
On Error GoTo err_Fix:
Dim myInsertRow As Long
myInsertRow = InputBox("Which row would you like to place a new row in?", "Insert new row")
If (myInsertRow > 0) And (myInsertRow < 65536) Then
Rows(myInsertRow).EntireRow.Insert
Else
MsgBox "You have entered an invalid row number"
End If
Exit Sub
err_Fix:
If Err.Number = 13 Then
MsgBox "You have entered an invalid row number"
Else
MsgBox Err.Number & ": " & Err.Description
End If
End Sub
</code>
thank you for all your help.
What I am searching for is how to have a user insert text using an input box into the row they just inserted via input box.
An input box asks user which row to insert new row.
then an input asks what text to input into that row on column 3.
here is the code im using to input new row, found this online and it works great.
<code>
Private Sub CommandButton7_Click()
On Error GoTo err_Fix:
Dim myInsertRow As Long
myInsertRow = InputBox("Which row would you like to place a new row in?", "Insert new row")
If (myInsertRow > 0) And (myInsertRow < 65536) Then
Rows(myInsertRow).EntireRow.Insert
Else
MsgBox "You have entered an invalid row number"
End If
Exit Sub
err_Fix:
If Err.Number = 13 Then
MsgBox "You have entered an invalid row number"
Else
MsgBox Err.Number & ": " & Err.Description
End If
End Sub
</code>
thank you for all your help.