Use Excel VBA to Get Username of Person Logged in to Computer

Using Excel VBA you can get the username of the person logged into the computer and print it to a cell.

I have used this before to monitor which users on a network where accessing a staff performance system. I won’t publish the full code, but just the section that gets the username.

So, the code below would be entered as a new module. Note, it is just one line of code to get the name and print to the cell.

Public Sub Get_UserName()

Cells(1,1) = Application.UserName

End Sub

You could add in an extra line of code to then get the computer name of the computer the person is using.

763 thoughts on “Use Excel VBA to Get Username of Person Logged in to Computer

  1. healthy fresh recipes

    I really love your website.. Very nice colors & theme. Did you develop this amazing site yourself? Please reply back as I’m planning to create my own website and want to learn where you got this from or just what the theme is named. Thanks!

  2. Baixar Iptv Brasil Online

    Ponto IPTV a melhor programacao de canais IPTV do Brasil, filmes, series, futebol, lutas, shows, documentarios em alta definicao de imagem e som em SD, HD, FULL HD, 4K. compativel com todos aparelhos do mercado Brasileiro.

  3. App Para Assistir Tv Gratis

    Ponto IPTV a melhor programacao de canais IPTV do Brasil, filmes, series, futebol, lutas, shows, documentarios em alta definicao de imagem e som em SD, HD, FULL HD, 4K. compativel com todos aparelhos do mercado Brasileiro.

  4. Aplicativo De Tv No Pc

    Ponto IPTV a melhor programacao de canais IPTV do Brasil, filmes, series, futebol, lutas, shows, documentarios em alta definicao de imagem e som em SD, HD, FULL HD, 4K. compativel com todos aparelhos do mercado Brasileiro.

  5. Eula Roup

    Pretty nice post. I just stumbled upon your blog and wished to say that I have truly enjoyed browsing your blog posts. After all I will be subscribing to your feed and I hope you write again very soon!

Comments are closed.