Am looking to have a command button on my spreadsheet that inputs my windows logon/outlook name into a specfied cell, does anyone know how I would go about this?
Go to your spreadsheet's code, insert a new module (don't add to the sheets or ThisWorkbook) via the menu, paste the function in the new module's "(General)" section -
Code:
Function UserNameWindows() As String
UserNameWindows = Environ("USERNAME")
End Function
Thanks for all the input,managed to get this working. Another issue I've got, does anyone know how I would pull the header information from a web page to a specific cell in excel?
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.