Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,074
- Office Version
- 2019
- Platform
- Windows
I have the code that exports my data into a textfile as a CSV. The code works great except that if any cell has 0 (Zero), it shows as $-. Is there a way to export the 0's as an integer when creating the text file?
VBA Code:
Set BkUp = Workbooks.Add
Rng.Copy BkUp.Sheets(1).Range("A1")
With BkUp
.Sheets(1).Columns("F:F").NumberFormat = "0.0000000000"
.Sheets(1).Columns("K:K").NumberFormat = "0.0000000000"
For Each c In Wks.Range("S7:S" & LRow)
If Not c.Comment Is Nothing Then
With BkUp.Sheets(1).Cells(c.Row - 6, "S")
.Value = .Value & COMMENT_DELIMITER & c.Comment.Text
End With
End If
Next c
.SaveAs Filename:=txtFile, FileFormat:=xlCSV
.Close False
End With