PDA

View Full Version : [SOLVED] Populate form label with cell value



mykal66
01-23-2014, 07:48 AM
I'm trying to get a labl on a form to populate on load with the valuefrom Cell A1 on Sheet 1. I've tried several methods found on the internet but can't get any to work, the form loads but the label is blank!

I've attached an example spreadhseet which in essenec will show the user the current target then allow them to update via the text box.
Can anyone help with the label issue please

thank you

Bob Phillips
01-23-2014, 08:19 AM
Private Sub UserForm_Activate()
Me.Textbox1.Text = Worksheets("Sheet1").Range("A1").Value
End Sub

mancubus
01-23-2014, 08:20 AM
hi. ----- you can change the caption of the label. ----- put below line in UserForm's Initialize event: -----
lbl1.Caption = "Current Target: " & Worksheets("Sheet1").Range("A1").Value

mykal66
01-23-2014, 08:30 AM
Thank you both very much for quick responses - all working now prefectly now