Option Explicit
Sub FormatRuledLine()
For Each c In Selection
c.Borders.LineStyle = xlContinuous
If c.Value = "" Then
c.Borders(xlEdgeTop).LineStyle = xlLineStyleNone
c.Borders(xlEdgeBottom).LineStyle = xlLineStyleNone
End If
Next c
End Sub
Sub ToggleGridLines()
If ActiveWindow.DisplayGridlines = True Then
ActiveWindow.DisplayGridlines = False
Else
ActiveWindow.DisplayGridlines = True
End If
End Sub
Sub InsertNewline()
For Each c In Selection
If Right(Trim(c.Value), 1) <> Chr(10) Then
c.Value = c.Value & Chr(10)
End If
Next c
End Sub
Function GetLastRow(ByVal strColName As String)
GetLastRow = ActiveWorkbook.ActiveSheet.Range(strColName & "65536").End(xlUp).Row
End Function