Label caption on loading a userfform

E

ecando

Hi,
How can I update a label caption (froma cell range) upon loading a use
form? I can get it to happen with a button click, but want it to get th
values from a cell ... and cann't?
If you can help, that'd be great !
:
 
M

mangesh_yadav

in the Sub UserForm_Initialize(), put a line
label.caption = worksheets("Sheet1").range("A1").value
A1 in sheet1 contains the value for the label caption

Manges
 
E

ecando

mangesh_yadav said:
*in the Sub UserForm_Initialize *

Thanks Mangesh ... VERY new to this... not sure about the above .. bu
will try and figure it out.....
:
 
M

mangesh_yadav

in the design view, double click on the form. You will enter the mode
where you have to enter the code. Place the following code there
Private Sub UserForm_Initialize()
button_name.caption = worksheets("Sheet1").range"A1").value
End Sub

mangesh
 
E

ecando

mangesh_yadav said:
*in the design view, double click on the form. You will enter th
mode where you have to enter the code. *

THAT'S what I wasn't doing .... now works perfectly.

THANKS VERY MUCH

:cool: :) :
 
Top