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?
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
969
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.
 

myfe

Board Regular
Joined
Jul 1, 2012
Messages
58
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
 

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
969

ADVERTISEMENT

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
 

myfe

Board Regular
Joined
Jul 1, 2012
Messages
58
Thanx Mindpsyche,

I will check it today hope it solves my issue
 

Watch MrExcel Video

Forum statistics

Threads
1,122,822
Messages
5,598,307
Members
414,224
Latest member
Crazy_FC

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
Top