___
New Member
- Joined
- Nov 16, 2004
- Messages
- 14
Hi All,
I'm having trouble trying to delete blank rows before saving as .txt (please see red code snippet, doesn't work).
Any help much appreciated.
I'm having trouble trying to delete blank rows before saving as .txt (please see red code snippet, doesn't work).
Any help much appreciated.
Rich (BB code):
Dim wbSource As Workbook
Dim wsSource As Worksheet
Dim wbDest As Workbook
Dim fName As String
Set wbSource = ActiveWorkbook
Set wsSource = ActiveSheet
Set wbDest = Workbooks.Add
wsSource.Range("IS10:IV3000").Copy
wbDest.Worksheets(1).Cells(1, 1).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
wbDest.Worksheets(1).Range("A:A").Select
wbDest.Worksheets(1).Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
wbDest.SaveAs Filename:="C:\Upload\" & Format(Now, "dd-mm-yy hh-mm-ss") & " proforma" & ".txt", FileFormat:=xlText, _
CreateBackup:=False