tigerlilly
Technical User
I am trying aligning my columns and getting rid of the decimal points I have it now defined as currency, but it is supposed to be a number W/O decimals. My code is below. Can someone please help me?? Thank you!!!
Private Sub DisplayHeader()
txtschedule.Text = RightAlign("EOY", cfEOYvaluewidth) & _
RightAlign("Accum", cfAccumDepwidth) & vbNewLine & _
RightAlign("Year", cfyearswidth) & _
RightAlign("Depr", cfdeprwidth) & _
RightAlign("Value", cfEOYvaluewidth) & _
RightAlign("Depr", cfdeprwidth)
End Sub
'Build the formated detail line and add to the text box
txtschedule.Text = txtschedule.Text & vbNewLine & _
RightAlign(Format(I, "0.00"
, cfyearswidth) & _
RightAlign(Format(fdepr, "0.00"
, cfdeprwidth) & _
RightAlign(Format(feoyvalue, "0.00"
, cfEOYvaluewidth) & _
RightAlign(Format(faccumdepr, "0.00"
, cfAccumDepwidth)
Next I
End Sub
How do I get the columns to align?
I have 4 columns
Column 1 is Year
Column 2 is Depr
Column 3 is EOY value
Column 4 is Accum Depr
Private Sub DisplayHeader()
txtschedule.Text = RightAlign("EOY", cfEOYvaluewidth) & _
RightAlign("Accum", cfAccumDepwidth) & vbNewLine & _
RightAlign("Year", cfyearswidth) & _
RightAlign("Depr", cfdeprwidth) & _
RightAlign("Value", cfEOYvaluewidth) & _
RightAlign("Depr", cfdeprwidth)
End Sub
'Build the formated detail line and add to the text box
txtschedule.Text = txtschedule.Text & vbNewLine & _
RightAlign(Format(I, "0.00"
RightAlign(Format(fdepr, "0.00"
RightAlign(Format(feoyvalue, "0.00"
RightAlign(Format(faccumdepr, "0.00"
Next I
End Sub
How do I get the columns to align?
I have 4 columns
Column 1 is Year
Column 2 is Depr
Column 3 is EOY value
Column 4 is Accum Depr