Editable Userform

MarkDShark

Board Regular
Joined
Jun 10, 2008
Messages
228
I've created a Userform to popup on print. The form will show the info that was typed onto a spreadsheet. However, the Userform can also be used to edit the spreadsheet directly on the userform itself if any info on the spreadsheet was in error. The userform edits in real time, so im able to see my spreadsheet figures change as i type into the text boxes on the Userform. The thing im trying to accomplish on the Userform, is for it to also change figures in real time on the Userform itself. The Userform picks up money figures and balances from my spreadsheet. As i edit my spreadship from the Userform and change money figures on it, my spreadsheet balances will change due to it recalculating itself. Is there anyway for the Userform to update its self as well and recalculte the new balances on the Userform as i type new money figures on it? The codes im using at the moment are as follows, some are just snip its to give u an idea of what im working with,

Private Sub CommandButton1_Click()
Sheets(2).PrintOut
Unload Me
End Sub

Private Sub CommandButton2_Click()
Sheets("Sheet1").Range("V6").Value = TextBox1.Value
Sheets("Sheet1").Range("V8").Value = TextBox2.Value
Sheets("Sheet1").Range("V9").Value = TextBox3.Value
Sheets("Sheet1").Range("V10").Value = TextBox4.Value

Private Sub TextBox1_Change()
Sheets("Sheet1").Range("V6").Value = TextBox1.Value
TextBox1.Value = Sheets("Sheet1").Range("V6").Value
End Sub
Private Sub TextBox2_Change()
Sheets("Sheet1").Range("V8").Value = TextBox2.Value
TextBox2.Value = Sheets("Sheet1").Range("V8").Value
End Sub
Private Sub TextBox3_Change()
Sheets("Sheet1").Range("V9").Value = TextBox3.Value
TextBox3.Value = Sheets("Sheet1").Range("V9").Value
End Sub

Private Sub UserForm_Initialize()
TextBox1.Text = Sheets("Sheet1").Range("V6").Text
TextBox2.Text = Sheets("Sheet1").Range("V8").Text
TextBox3.Text = Sheets("Sheet1").Range("V9").Text

Hope your able to understand what i would like the userform to do. Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
In your TextBox Change event procedures you just need to update TextBox4 so that it contains the lastest figure in V10.
 

MarkDShark

Board Regular
Joined
Jun 10, 2008
Messages
228
In some of the cells that are picked up by the Userform, have formulas within them. I've tried to play around with the codes, but as the Userform picks up the information, and i attmept to edit money figures in cells that contribute to the balance(the cell with the formula) the Userform erases the formula and doesn't change to what would have been the new balances after corrections. Which textboxes are you refering to as far as changing? Do mean change all text boxes or just one? I'm not sure which procedures to use since again, i've change the codes, but in the end when i updated anything on the Userform, it erases the formulas in cells that it picks up.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,047
Messages
5,639,767
Members
417,110
Latest member
RayClarke

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