Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform value
I have a userform that when is shown when the user clicks a button. When the
userforms opens I want to show a number in a textfield. However that fails and the field shows nothing. The number is found in a cell and the number is then read in to a variable that is to be shown in the userform. Pls help me with this problem. Private Sub UserForm1_Initialize() Set rngErrorMarginCell = Range("d5") dblErrorMarginal = rngErrorMarginCell.Value TextBox1.Text = dblErrorMarginal End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform value
Try qualifying with the worksheet name
Set rngErrorMarginCell =Worksheets("Sheet1").Range("d5") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Arne Hegefors" wrote in message ... I have a userform that when is shown when the user clicks a button. When the userforms opens I want to show a number in a textfield. However that fails and the field shows nothing. The number is found in a cell and the number is then read in to a variable that is to be shown in the userform. Pls help me with this problem. Private Sub UserForm1_Initialize() Set rngErrorMarginCell = Range("d5") dblErrorMarginal = rngErrorMarginCell.Value TextBox1.Text = dblErrorMarginal End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Access from add_in userform to main template userform.... | Excel Programming | |||
Linking userform to userform in Excel 2003 | Excel Programming |