Userforms in Excel 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I draw information from a cell within Excel and add it to a
label/caption on a Userform?
 
Like this, have to include the sheet
Private Sub UserForm_Activate()
UserForm1.Caption = Sheets("sheet1").Cells(1, 1)

End Sub
 
When do you want it to happen

Say when the form is first shown
In the userform module:

Private Sub Userform_Initialize()
me.Label1.Caption = Worksheets("Sheet2").Range("B9").Text
End Sub


If you wanted to link it to a cell then use a textbox. for Properties,
change the specialeffect property to flat and the backcolor to menu bar
and Locked to true

This will make it look pretty much like a label.
 
Back
Top