![]() |
UserForm: force to update controlsources
G'Day,
On my userform I have got a multipage with dozens of textboxes and spinbutton, which is not located on the multipage, but on the main area of the UserForm.. If the user enters text into a textbox on the multipage and hits the spinbutton the entry is gone lost (the ControlSouce cell is not going to be updated). This does not happen if the TextBox is "on the same page" with the spinbutton. This is a kind of a "failure-mode" I'd like to control, caused by the user not necessarily knowing the need to enter the data before spinning onto the next record. How can I force update of the ControlSources of TextBoxes located on the Multipage, on the event the SpinButton is hit ? Private Sub SpinButton1_SpinDown() If ScrollBar1.Value = ScrollBar1.Max Then GoTo 77 ActiveCell.Offset(1, 0).Select ScrollBar1.Value = ScrollBar1.Value + 1 FillForm 77 End Sub Sub FillForm() MyLine = ActiveCell.Row TextBox1.ControlSource = "Q" & MyLine TextBox2.ControlSource = "R" & MyLine TextBox3.ControlSource = "S" & MyLine TextBox4.ControlSource = "T" & MyLine TextBox5.ControlSource = "U" & MyLine End Sub Thanks Gabor Thans |
All times are GMT +1. The time now is 03:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com