simple userform for my excel calculator

myfe

Board Regular
Joined
Jul 1, 2012
Messages
58
Hi,
I built a calculator for interest-rates and some other finance stuff. I used some VBA codes for my macros. Now I need to make an interface for all my work.
Is there an easy way to connect my work to a user-form or an interface to represent my calculator in a much user friendly way?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
What do you mean you "built a calculator"?

Does that mean you have cells calculating? If you have macros already written, you can assign those to buttons, text boxes, etc., within excel if you need to.
 
Upvote 0
Great,
But not all the calculations are by macros some of them are as simple as "=(A1*B3)/9" .
what I want to know is how to make a "text box" in the user form connected to a cell so the inputs and the out puts in this text box are exactly like the inputs and output of the cells in the spreadsheet
 
Upvote 0
It should be as easy as just setting the textbox to = whatever cell you want to link it to.

Code:
Sub UserformStartup_Initialize()
    Userform1.Textbox1 = Sheet1.Range("A1")
End Sub

You would need to modify all the names, cell references, etc., to reflect the right names, but this would get you started.

Also, rather than linking the userform to cells, why not have them enter their data into the form and calculate it that way?

When they click a button on the form (or hit enter, etc.,)...userform1.tbxSum = userform1.textbox1 x userform1.textbox2.

This is crude, but an example of what you can do.

Let me know if you need more help. If you PM me your email address I can send you an example workbook.

Brian
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top