How do i get the windows username of the person trying to run the macro and set it to a variable? I am trying to make a macro that will use this, but it appears to not work the same as programs such as excel.
See this answer:
How to get logged-in user's name in Access vba? - Stack Overflow
To get this code to work in SolidWorks 2013 and later, you might need to use the steps I explain here:
SolidWorks API Video Tutorials » How to make your VBA macros x64 compatible
SolidWorks API Training
I was able to use:
Dim UserName As String
UserName = Environ("USERNAME")
Cool. If that link helped you, please mark my answer as correct so others know the issue is resolved.
Retrieving data ...