Results 1 to 2 of 2

Thread: Listbox Items formatted (ex. - 7.00%, 7.25%, etc.)

  1. #1

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262

    Cool

    How do you format items in the listbox without changing the value???

    Items are percentages:
    7.00%
    7.25%
    7.50%
    etc
    etc

    Thanks,
    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    [email protected]

    Climb & Maintain FL410,
    Cleared Direct Rainr

  2. #2

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    I keep answering my own questions.

    Code:
    dblPrncpl = txtPrincipal.Text
    dblRate = Val(lstInterest.Text)
    dblRate = dblRate / 100
    MonPmt = Pmt(dblRate / 12, intPmts, -dblPrncpl)
    lblPayment = Format(MonPmt, "$###,###,##0.00")
    My problem was that in the listbox of percentages (APR's) the % was conflicting with the pmt function.
    Then, the light came on. Use the Val function to eliminate the percentage symbol conflict.

    Hmmm, it worked!

    Peace,
    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    [email protected]

    Climb & Maintain FL410,
    Cleared Direct Rainr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width