Results 1 to 2 of 2

Thread: using + - / \ and * in strings

  1. #1
    Guest

    Question

    i want to make the user choose how he likes to calculate stuff but he need to select the proper sign (* / \ + -) the i ned to use it in a string such as this

    2 sign 2 = ?

    but how do i do that

    and gow do i pull the sign of a combo list box

  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Location
    St-Élie d'Orford, Quebec, Canada
    Posts
    133
    Hi, having a bit of trouble with ComboBox do you ?

    I may have a solution for you (if not too late)...

    Don't try to do this operation a at once (in one string)

    Do so :

    1) Set your combo to dropdown list
    2) Fill your list with your +-/\* signs and assign them
    a specific ItemData ( let's say 0 to 4)

    3) When it's time to do the math, do this

    select case (combo.itemdata(comdo.listindex))

    case 0
    Do the operation with the +

    case 1

    Do the operation with the -

    and so on...


    end select


    Simple, not too complicated and... it works !!!

    Hope I helped...

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