Hello, I'm using the current code to insert a row. Everything works but very slowly
Is there any form of shortening this code and accelerating ?
I wants to copy formulas and formatting from the front row during macro execution and add to the new inserted row
Is there any form of shortening this code and accelerating ?
I wants to copy formulas and formatting from the front row during macro execution and add to the new inserted row
VBA Code:
Sub dodaj_dodaj_wiersz()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim tbl As ListObject
Set tbl = ws.ListObjects("Tabel3")
Dim newrow As ListRow
Set newrow = tbl.ListRows.Add
Application.Calculation = True
Application.ScreenUpdating = True
Application.EnableEvents = True
Dim cellleft As Single
Dim celltop As Single
Dim cellwidth As Single
Dim cellheight As Single
Dim shp As Shapes
Dim shpTemp As Shape
newrow.Range(1, 13).Font.Bold = True
newrow.Range(1, 13).HorizontalAlignment = xlCenter
newrow.Range(1, 13).VerticalAlignment = xlCenter
newrow.Range(13) = "1"
newrow.Range.RowHeight = 30
Worksheets("Formulss").Range("A1").Copy
newrow.Range(2).PasteSpecial Paste:=xlFormulas
dodaj_dodaj_wiersz_Drku
cellleft = newrow.Range(3).Left
celltop = newrow.Range(3).Top
Set shpTemp = ActiveSheet.Shapes.AddShape(msoShapeMathPlus, cellleft - 25, celltop + 8, 15, 15)
shpTemp.OnAction = "'" & ActiveWorkbook.Name & "'!Add_Info"
shpTemp.Fill.ForeColor.RGB = RGB(0, 0, 0)
shpTemp.Fill.Transparency = 0.7
End Sub