Results 1 to 4 of 4

Thread: Calculator program

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    2

    Calculator program

    Scroll down some
    Last edited by tenchi86; Dec 2nd, 2004 at 01:34 AM.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    I think that you should post what you have, and we'll guide you if you run into problems. (I was going to add something negative, but decided against it.)

    Anyways, how are you supposed to determine this:


    The registration clerk will need to enter the number registered for the seminar, then select either the Seminar 1 option button or the Seminar 2 option button. If a company is entitled to a 10% discount, the clerk will click the calculate Total Due command button to calculate the total registration fee
    Last edited by dglienna; Dec 2nd, 2004 at 12:55 AM.

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    2
    Ok sorry that was a stupid way to put it. Here is what I need help on how do I make the program do 100*X and then do 120*X if check box is checked? On that I really have no code to post.

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    You should really use option buttons, as one of the choices always has to be selected, and both cannot be selected.
    Have a textbox for NumberOfGuests. You should have a checkbox for Discount. If it is checked, get 10% off:

    Code:
    Sub CmdCompute_Click()
       If optOneDay = 1 Then
         Price = 120
       Else
         Price = 100
       End If
       Cost = Price * val(NumberOfGuests.Text)
       msg = "Your "
       If optDiscount = 1 Then 
          Cost = Cost - (Cost * .10) 
          msg = msg & " Discounted "
      endif 
      msg = msg & " Cost is: "
      MsgBox msg  & format(Cost, "$,$$$.00")
    End Sub
    Last edited by dglienna; Dec 2nd, 2004 at 03:20 AM.

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