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!
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!