greenhorn question abt variable -- currency -- 2 decimal--right align into pictuebox 
Author Message
 greenhorn question abt variable -- currency -- 2 decimal--right align into pictuebox

i have looked in all my reference books but cant' find this mentioned
i have raw data which i am collecting via textboxes
some is manipulated (eg. 3.5 hours * 45.00 cost per hour)
i have to print data into picture box
all financial data is supposed to be put into one column with right
alignment and dollar signs, etc.  okay so far, but some of my
manipulated data prints as ($8.5 instead of $8.50).
if i use the format$ "currency" then i lose the right alignment

places.  how is this handled?  your help appreciated.
catherine



Fri, 26 Feb 1999 03:00:00 GMT  
 greenhorn question abt variable -- currency -- 2 decimal--right align into pictuebox

  >alignment and dollar signs, etc.  okay so far, but some of my
  >manipulated data prints as ($8.5 instead of $8.50).
  >if i use the format$ "currency" then i lose the right alignment

  >places.  how is this handled?  your help appreciated.
  >catherine

This is off the top of my head, but try




Fri, 26 Feb 1999 03:00:00 GMT  
 greenhorn question abt variable -- currency -- 2 decimal--right align into pictuebox

Quote:

>all financial data is supposed to be put into one column with right
>alignment and dollar signs, etc.  okay so far, but some of my
>manipulated data prints as ($8.5 instead of $8.50).
>if i use the format$ "currency" then i lose the right alignment

>places.  how is this handled?  your help appreciated.
>catherine

here is a sub to do it
Function rFormat (value As Variant, fmt As String) As Variant

End Function

-------------------------------------------------------------



Fri, 26 Feb 1999 03:00:00 GMT  
 greenhorn question abt variable -- currency -- 2 decimal--right align into pictuebox

 >all financial data is supposed to be put into one column with right
 >alignment and dollar signs, etc.  okay so far, but some of my
 >manipulated data prints as ($8.5 instead of $8.50).
 >if i use the format$ "currency" then i lose the right alignment

 >places.  how is this handled?  your help appreciated.
 >catherine

Paste this in a new form as see if it fits your needs....

Sub Form_Load ()
Dim x As Currency
Dim t As String * 12   'Note this is fixed length

Show
FontName = "Fixedsys"
FontBold = False
For x = -1000 To 1000 Step 91.15
    RSet t = Format(x, "$#,###,##0.00 ;($#,###,##0.00)")
    Print t
Next x

End Sub



Sat, 27 Feb 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Right aligned text boxes don't right align

2. left align and/or right align the masked edit control under VB 5.0 SP(3)

3. TextBox question: MultiLine=True, Align=Right...

4. Newbie question - Right aligning text

5. Align right the value of a currency variable using the print method of the printer object?

6. Help: how to align currency?

7. VB 3.0 Standard Ed. Aligning currency for output

8. Align Currency Format Using Maskedit control

9. Align Currency Format Using Maskedit control

10. Align Currency Format Using Maskedit control

11. Aligning Currency figures to form/printer

12. Printing/displaying list of currency numbers to Align

 

 
Powered by phpBB® Forum Software