LearningJava
asked on
Printing format Problems
Hi:
When I use Debug.Print with the following code; the output is correctly formatted but when I use Printer.Print I lose the formatting(does not align at the decimal point). Can someone tell me why this happens and how to fix it?
Private Sub cmdPrint_Click()
Dim strPS As String * 7, strPS2 As String * 7, strPS3 As String * 7
RSet strPS = Format(564, "##,###.")
RSet strPS2 = Format(777, "##,###.")
RSet strPS3 = Format(902, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
RSet strPS = Format(4500, "##,###.")
RSet strPS2 = Format(888, "##,###.")
RSet strPS3 = Format(9, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
RSet strPS = Format(4, "##,###.")
RSet strPS2 = Format(59, "##,###.")
RSet strPS3 = Format(34556, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
Printer.EndDoc
End Sub
When I use Debug.Print with the following code; the output is correctly formatted but when I use Printer.Print I lose the formatting(does not align at the decimal point). Can someone tell me why this happens and how to fix it?
Private Sub cmdPrint_Click()
Dim strPS As String * 7, strPS2 As String * 7, strPS3 As String * 7
RSet strPS = Format(564, "##,###.")
RSet strPS2 = Format(777, "##,###.")
RSet strPS3 = Format(902, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
RSet strPS = Format(4500, "##,###.")
RSet strPS2 = Format(888, "##,###.")
RSet strPS3 = Format(9, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
RSet strPS = Format(4, "##,###.")
RSet strPS2 = Format(59, "##,###.")
RSet strPS3 = Format(34556, "##,###.")
Printer.Print strPS, strPS2, strPS3
'Debug.Print strPS, strPS2, strPS3
Printer.EndDoc
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.