Hello mrexcel Community
I have a problem with my VBA Code in Excel, I dont speak VBA or even english
The code I have tried to create is not doing what I want it to do. When I click on the Command Button than it does not create a new Row.
The result of my tryings is this one:
I have 3 lists in my excel sheet and my idea was, when I click on an button, it will add a new row underneath and merge the cells from B-F.
I apologize for my bad english and hope someone can help me.
I have a problem with my VBA Code in Excel, I dont speak VBA or even english
The code I have tried to create is not doing what I want it to do. When I click on the Command Button than it does not create a new Row.
The result of my tryings is this one:
Code:
Private Sub CommandButton4_Click()
Dim finden, cell As Range
Dim Wert As String
Dim MyRange As Object
Set finden = Range("B1:B500")
For Each cell In finden
If cell.Text = "Names:" Then
cell.Select
With ActiveCell
.Offset(1, 0).Activate
End With
Else
End If
Next
ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "F")).MergeCells = True
End Sub
I have 3 lists in my excel sheet and my idea was, when I click on an button, it will add a new row underneath and merge the cells from B-F.
I apologize for my bad english and hope someone can help me.