Two short questions
Thanks. Worked great. However I have two more questions in order to tweak
the display.
1) the format I used ("$##0.00) causes the numbers to not line up. If
there is no money made on a job, then I get $0.00, when I need $ 0.00. How
can I get the spaces in there? I tried "$000.00" also.
2). I want to underline between 2nd line and Total. How do I get the
underline in there?
Thanks again!!
Les
"Ron Rosenfeld" wrote:
On Sun, 27 Jan 2008 10:43:01 -0800, WLMPilot
wrote:
1) How is a variable DIM if it might hold decimal places?
DIM dNum as Double
2) Ref Msgbox, how do I show multiple lines within Msgbox?
Separate the lines with vbLf
I have two
part-time jobs and I want to display the estimated pay for each for current
payperiod and then a total. I can get it on one line, but I would like to
show each job on separate line and lined up so I can display total amount too.
EXAMPLE: EMS Job1: $100.00
EMS Job2: $235.00
TOTAL: $335.00
For example:
================================
Option Explicit
Sub foo()
Const dVar1 As Double = 100
Const dVar2 As Double = 235
Const sFmt As String = "$#,##0.00"
MsgBox ("EMS Job 1: " & Format(dVar1, sFmt) & _
vbLf & "EMS Job 2: " & Format(dVar1, sFmt) & _
vbLf & "TOTAL: " & Format(dVar1 + dVar2, sFmt))
End Sub
====================================
--ron
|