Reputation: 1083
I've been searching and found various links, but none seem to address the problem that I have.
I have a userform with a label, and I want the caption of the label to be whatever cell B2 is. This is what I currently have:
Private Sub Label1_Click()
UserForm1.Label1.Caption = Worksheets("Sheet1").Range("B2").Value
End Sub
My problem is that I have a Label1_Click()
and the label only appears in my userform when I click. Which do I choose to make the label appear in my userform immediately as it opens?
Upvotes: 0
Views: 611
Reputation: 75840
Either:
Private Sub UserForm_Initialize()
Me.Label1.Visible = True
End Sub
Or:
Change settings of the label if you don't want it hidden at all:
Visible
to True
Upvotes: 1