Title
I'm trying to use MyUser and MyDate in many modules but it just returns blank.
I'm trying to use MyUser and MyDate in many modules but it just returns blank.
Code:
Public MyUser As String
Public MyDate As String
Sub GetMyUser()
Dim MyUser As String
MyUser = Application.WorksheetFunction.Proper(Application.UserName)
End Sub
Sub GetMyDate()
Dim MyDate As String
MyDate = Format(Now(), "DD-MM-YYYY HH:MM")
End Sub
Sub Test()
MsgBox MyDate
MsgBox MyUser
End Sub
Last edited: