Hi all,
I'm building a userform, and I want to include application.username in label1.caption
I tried several codes but none has succeeded to show the username, I believe the most logic thing to do is to load the label caption when the userform loads, using this code, but it didn't work
Private Sub Workbook_Open()
WelcomeScreen.Show
WelcomeScreen.Label1.Caption = "Dear Mr. " & Application.UserName & ", Please select a form from below list"
End Sub
The only code that showed the username was the following:
Private Sub Label1_Click()
Label1.Caption = "Dear Mr. " & Application.UserName & ", Please select a form from below list"
End Sub
but it works only if the user clicked on the BLANK label1 area of the form, and that aint logical.
Please help me.
I'm building a userform, and I want to include application.username in label1.caption
I tried several codes but none has succeeded to show the username, I believe the most logic thing to do is to load the label caption when the userform loads, using this code, but it didn't work
Private Sub Workbook_Open()
WelcomeScreen.Show
WelcomeScreen.Label1.Caption = "Dear Mr. " & Application.UserName & ", Please select a form from below list"
End Sub
The only code that showed the username was the following:
Private Sub Label1_Click()
Label1.Caption = "Dear Mr. " & Application.UserName & ", Please select a form from below list"
End Sub
but it works only if the user clicked on the BLANK label1 area of the form, and that aint logical.
Please help me.