Trevor3007
Well-known Member
- Joined
- Jan 26, 2017
- Messages
- 675
- Office Version
- 365
- Platform
- Windows
good evening,
Hi I use this code:-
How do I include the code below into the above , so they both run as one?
MTIA
Trevor3007
Hi I use this code:-
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.UsedRange.Borders.Weight = xlThick
Dim FirstRow As Long, LastRow As Long, i As Long
Application.EnableEvents = False
With ActiveSheet.UsedRange
FirstRow = .Row
LastRow = .SpecialCells(11).Row
End With
For i = LastRow To FirstRow Step -1
If WorksheetFunction.CountA(Rows(i)) = 0 Then Rows(i).Delete
Next
Application.EnableEvents = True
End Sub
How do I include the code below into the above , so they both run as one?
Code:
Sub WrapandFit()
ActiveCell.WrapText = True
ActiveCell.EntireRow.AutoFit
End Sub
MTIA
Trevor3007