Sub Remove_blankLine_file()
' This deletes blank code lines from active workbook ' Modified from actual frmeditor by Ajeet
Dim N As Long
Dim S As String
Dim LineCount As Long
Dim wb As Workbook
Dim Answer As String
Dim i As Integer
'Dim v As Integer
Dim vbaName() As String
Dim vbcomp As VBIDE.VBComponent
Dim vCount As Integer
Set wb = ActiveWorkbook
If ThisWorkbook.Name = ActiveWorkbook.Name Then GoTo endfunction
vCount = wb.VBProject.VBComponents.Count
ReDim vbaName(vCount)
For i = 1 To vCount
    With wb.VBProject.VBComponents(i)
            vbaName(i - 1) = .Name
    End With
For i = 0 To vCount - 1 'lstModules.ListCount - 1
    Answer = vbaName(i)
    Set vbcomp = wb.VBProject.VBComponents(Answer)
    With vbcomp.CodeModule
        For N = .CountOfLines To 1 Step -1
            S = .Lines(N, 1)
            '.DeleteLines N
            If Trim(S) = vbNullString Then .DeleteLines N
        Next N
    End With
Next i
Set wb = Nothing
Set vbcomp = Nothing
End Sub