Example
Range("C3:C7").Select
Selecting.Copy
Range("V2").Select
Selection.PasteSpecial Paste := xlValues,
Truncate the above snippet to
Range("C3:C7").Copy
Range("V2").PasteSpecial Paste := xlValues,
And for Font related code, Macro seems to generate unnecessary lines of code which are already consider default. VBA does not need to verify each of these default lines
Example
Range("F1").Select
With Selection.Font
.Name = "Tahoma"
.Size = 10
.Strikethrough = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
Delete those unnecessary lines to only ...
Range("F1").Select
With Selection.Font
.Name = "Tahoma"
.Size = 10
No comments:
Post a Comment