Is there a way that I can run this code faster?

Status
Not open for further replies.

VBE313

Well-known Member
Joined
Mar 22, 2019
Messages
686
Office Version
  1. 365
Platform
  1. Windows
Dim rngstart As Range
Dim l As Long, strCells As String
ActiveSheet.Unprotect Password:="B28"
Application.ScreenUpdating = False
Set rngstart = ActiveCell
l = ActiveCell.Row
strCells = "F" & l
Range(strCells).Select
Rows(ActiveCell.Row).Select
Rows(ActiveCell.Row).Offset(1, 0).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.RowHeight = 13.5
Rows(ActiveCell.Row).Offset(1, 0).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Offset(-1, 0).Select
ActiveCell.RowHeight = 5
ActiveCell.Select
ActiveCell.Offset(2, 0).Select
Rows(ActiveCell.Row).Select
Selection.Copy
ActiveCell.Offset(-2, 0).Select
ActiveSheet.paste
ActiveCell.Offset(-1, 0).Select
Rows(ActiveCell.Row).Select
Selection.Copy
ActiveCell.Offset(2, 0).Select
ActiveSheet.paste
Rows(ActiveCell.Row).ClearContents
Rows(ActiveCell.Row).Select
l = ActiveCell.Row
strCells = "F" & l
Range(strCells).Select
Application.Run "NoIndentLevel"
ActiveSheet.Protect Password:="B28"
ActiveSheet.Protect DrawingObje
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Status
Not open for further replies.

Forum statistics

Threads
1,215,493
Messages
6,125,131
Members
449,206
Latest member
burgsrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top