ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help with creating a caluclated pop up (https://www.excelbanter.com/excel-programming/411599-need-help-creating-caluclated-pop-up.html)

smonczka

Need help with creating a caluclated pop up
 
I have a list of software prices by licnes range, in other words 1-25
licenses would be 25$ 26-25 would be 20$. Users then have to multiply
the number of licenses they want in that range by the price on the
list. I can not create a wizard within the price sheet (insert
burocratic long story here). So what I would like to do is create a
pop up that would do the calculation for the users depending on what
cell they highlighted.

The user selects a price in the list. Click a button on the sheet and
a pop up allows them to do the calculation... say 1-25 licenses is
25$, they select the sell with 25$ in it. They click a button and a
form pops up with the 25$ in it and allows them to enter a multiplyer
to arrive at the total cost of the purchase.

I know how to make a pop up form and activate it with a macro button.
But I have no idea how i would automaticly bring in a selected cell
into the form and calculate it.

If anyone has some idea's please let me know. Thanks for the help!

Leith Ross[_2_]

Need help with creating a caluclated pop up
 
On May 27, 2:12 pm, smonczka wrote:
I have a list of software prices by licnes range, in other words 1-25
licenses would be 25$ 26-25 would be 20$. Users then have to multiply
the number of licenses they want in that range by the price on the
list. I can not create a wizard within the price sheet (insert
burocratic long story here). So what I would like to do is create a
pop up that would do the calculation for the users depending on what
cell they highlighted.

The user selects a price in the list. Click a button on the sheet and
a pop up allows them to do the calculation... say 1-25 licenses is
25$, they select the sell with 25$ in it. They click a button and a
form pops up with the 25$ in it and allows them to enter a multiplyer
to arrive at the total cost of the purchase.

I know how to make a pop up form and activate it with a macro button.
But I have no idea how i would automaticly bring in a selected cell
into the form and calculate it.

If anyone has some idea's please let me know. Thanks for the help!


Hello smonczka,

Here is a macro that will take the value of the selected cell and
multiply it by the value entered into the input box. There is no
validation or error checking in the code. You will need to add that
based on your needs.

Function CalcCost()

Dim Liceneses As Variant

Licenses = InputBox("Enter the number of licences you want to
purchase.")
CalcCost = Val(Licenses) * ActiveCell.Value

End Function

Sincerely,
Leith Ross

smonczka

Need help with creating a caluclated pop up
 
Leith, Just wanted to thank you very much for your help.

Thanks,
Steve


smonczka

Need help with creating a caluclated pop up
 
P.S. That worked great!!!!


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com