Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetUser() As String
Dim UserName As String
UserName = String(100, "0")
GetUserName UserName, 100
GetUser = VBA.Left$(UserName, InStr(UserName, Chr$(0)) - 1)
End Function
i believe the easiest way would be to create a reference to the fields, and just make the objects not visible. then just assign the values to the objects.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.