One of the routines in my VB6 application opens an Excel worksheet, and fills it with some data from SQL Server. In a recent addition, it sets the data format for one of the columns to financial data formatted as Dutch euros. The command for this is, in my case:
xlsApp.Cells(row, 5).NumberFormat = "_-[$€-413] * #,##0.00_-;_-[$€-413] * #,##0.00-;_-[$€-413] * " & Chr(34) & "-" & Chr(34) & "??_-;_-@_-"
Obviously the string for this particular format is rather complicated so I figured I'd put it into a constant named XlsDutchEuroFormat, but then I found out that I can't do function calls in a constant, disallowing my Chr(34) workaround to putting quotation marks in it.
Is there some other way I can put this into a constant? The quotation marks are an essential part of the string, I'm afraid. My code works fine without making it into a constant but if at all possible, I'd like to use one here.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
xlsApp.Cells(row, 5).NumberFormat = "_-[$€-413] * #,##0.00_-;_-[$€-413] * #,##0.00-;_-[$€-413] * " & Chr(34) & "-" & Chr(34) & "??_-;_-@_-"
Obviously the string for this particular format is rather complicated so I figured I'd put it into a constant named XlsDutchEuroFormat, but then I found out that I can't do function calls in a constant, disallowing my Chr(34) workaround to putting quotation marks in it.
Is there some other way I can put this into a constant? The quotation marks are an essential part of the string, I'm afraid. My code works fine without making it into a constant but if at all possible, I'd like to use one here.
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)