I am new to VB and have to make a commission calculator, but I am running into problems.
I have four text boxes where the following information will be added by the viewer:
- The Stock Broker's Name
- The Stock Name
- The Price Per Share
- The Number of Shares
I then have to multiply the number of shares by the price of the shares and output it in a message box. This part I have been able to do.
The problem I have not been able to accomplish is outputing the broker's and stock's names in the same message box as well as make a conditional statement to be placed underneath the total commission.
If the price of shares is less than or equal to $50 then I have to tell them their commission rate is 19% If the price is greater than $50 then the rate is 26%. And lastly, if the number of shares is below 150 then multiply 1.5 times rate.
I believe that I need nested IfElse statements to do the first conditional section and an AndAlso statement for the shares condition. i just don't know how to write the syntax correctly.
Help!!!
I have four text boxes where the following information will be added by the viewer:
- The Stock Broker's Name
- The Stock Name
- The Price Per Share
- The Number of Shares
I then have to multiply the number of shares by the price of the shares and output it in a message box. This part I have been able to do.
The problem I have not been able to accomplish is outputing the broker's and stock's names in the same message box as well as make a conditional statement to be placed underneath the total commission.
If the price of shares is less than or equal to $50 then I have to tell them their commission rate is 19% If the price is greater than $50 then the rate is 26%. And lastly, if the number of shares is below 150 then multiply 1.5 times rate.
I believe that I need nested IfElse statements to do the first conditional section and an AndAlso statement for the shares condition. i just don't know how to write the syntax correctly.
Help!!!
Comment