Skip to content

Commit

Permalink
Removed declared but not used variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
PGS62 committed Sep 20, 2021
1 parent 92c49b5 commit ff35a76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modCSVReadWrite.bas
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ Public Function CSVRead(FileName As String, Optional ConvertTypes As Variant = F
Optional MissingStrings As Variant, Optional ByVal ShowMissingsAs As Variant, _
Optional ByVal Encoding As Variant, Optional DecimalSeparator As String = vbNullString, _
Optional ByRef HeaderRow)
Attribute CSVRead.VB_Description = "Returns the contents of a comma-separated file on disk as an array."
Attribute CSVRead.VB_ProcData.VB_Invoke_Func = " \n14"

Const DQ = """"
Const Err_Delimiter = "Delimiter character must be passed as a string, FALSE for no delimiter. Omit to guess from file contents"
Expand All @@ -163,7 +165,6 @@ Public Function CSVRead(FileName As String, Optional ConvertTypes As Variant = F
Const Err_SkipToCol = "SkipToCol must be at least 1."
Const Err_SkipToRow = "SkipToRow must be at least 1."
Const Err_Comment = "Comment must not contain double-quote, line feed or carriage return"
Const Err_UTF8BOM = "Argument Encoding specifies that the file is UTF 8 encoded with Byte Option Mark, but the file has some other encoding"
Const Err_HeaderRowNum = "HeaderRowNum must be greater than or equal to zero and less than or equal to SkipToRow"

Dim AcceptWithoutTimeZone As Boolean
Expand All @@ -179,10 +180,8 @@ Public Function CSVRead(FileName As String, Optional ConvertTypes As Variant = F
Dim DateOrder As Long
Dim DateSeparator As String
Dim ErrRet As String
Dim FirstThreeChars As String
Dim i As Long
Dim ISO8601 As Boolean
Dim IsUTF8BOM As Boolean
Dim j As Long
Dim k As Long
Dim Lengths() As Long
Expand Down Expand Up @@ -506,7 +505,6 @@ Public Function CSVRead(FileName As String, Optional ConvertTypes As Variant = F

ErrHandler:
ErrRet = "#CSVRead: " & Err.Description & "!"
' If Not Stream Is Nothing Then Stream.Close
If m_ErrorStyle = es_ReturnString Then
CSVRead = ErrRet
Else
Expand Down Expand Up @@ -2966,6 +2964,8 @@ Public Function CSVWrite(ByVal Data As Variant, Optional FileName As String, _
Optional ByVal DateTimeFormat As String = "ISO", _
Optional Delimiter As String = ",", Optional Unicode As Boolean, _
Optional ByVal EOL As String = "")
Attribute CSVWrite.VB_Description = "Creates a comma-separated file on disk containing Data. Any existing file of the same name is overwritten. If successful, the function returns FileName, otherwise an ""error string"" (starts with `#`, ends with `!`) describing what went wrong."
Attribute CSVWrite.VB_ProcData.VB_Invoke_Func = " \n14"

Const DQ = """"
Const Err_Delimiter = "Delimiter must have at least one character and cannot start with a " & _
Expand Down
Binary file modified workbooks/VBA-CSV.xlsm
Binary file not shown.

0 comments on commit ff35a76

Please sign in to comment.