Hello!
I have some VBA that generates an email that includes an HTML table, into which some values (defined as integer variables in the VBA) are put. I was wondering if there is a way to format the numbers to appear as (#) when they are negative.
Here is the code as it is parsed into the HTML (I cannot figure out how to get the HTML to show in the post).
<td style = 'border-left:2px solid black; border-bottom:1px solid black;'>" & tot4 & "</td>
I have tried the following:
<td style = 'border-left:2px solid black; border-bottom:1px solid black;'>" & Format(tot4, "#;[Red](#)") & "</td>
And this results in (#) formatting, but without the red.
Any thoughts would be much appreciated!
I have some VBA that generates an email that includes an HTML table, into which some values (defined as integer variables in the VBA) are put. I was wondering if there is a way to format the numbers to appear as (#) when they are negative.
Here is the code as it is parsed into the HTML (I cannot figure out how to get the HTML to show in the post).
<td style = 'border-left:2px solid black; border-bottom:1px solid black;'>" & tot4 & "</td>
I have tried the following:
<td style = 'border-left:2px solid black; border-bottom:1px solid black;'>" & Format(tot4, "#;[Red](#)") & "</td>
And this results in (#) formatting, but without the red.
Any thoughts would be much appreciated!
Last edited: