Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem using UserForm in Macro
Hi Bob,
umm... it still doesn't work.... Terence -----Original Message----- Terence, The form is being loaded before you populate the textbox. Trying doing it the other way around Private Sub cmdButton_Click() : : frmTest.txtbox1.Value = rst.Fields("testing") frmTest.Show End Sub -- HTH Bob Phillips "Terence" wrote in message ... Hi, I am writing a macro with a button on the worksheet. When the button is clicked, the userform pops up and the data of the recordset is displayed on the textbox of the form. e.g. Private Sub cmdButton_Click() : : frmTest.Show frmTest.txtbox1.Value = rst.Fields("testing") End Sub However, the screen pops up but the textbox remains empty. Then I close the form and press the button again, the screen pops up but this time the value is shown on the textbox. Does anyone knows why? Thanks a lot. Terence . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform Import problem | Excel Discussion (Misc queries) | |||
Userform problem? | Excel Discussion (Misc queries) | |||
userform problem | Excel Discussion (Misc queries) | |||
Problem using UserForm in Macro | Excel Programming | |||
Chart into Userform Problem | Excel Programming |