# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  >  Mac VBA - Get Mac username

## stcharun

Hi,

I am using mac excel. I want to know how to get the mac username in vba.

For example, in mac terminal, if you type




```
Please Login or Register  to view this content.
```


we get <username>

I just need to know how we can do it in vba.

Thanks a lot for the help.

Charun

----------


## Lifesigns

Hi stcharun,

I've not used Excel for Mac before but have you tried:




```
Please Login or Register  to view this content.
```


The first returns the username provided in Office and the second the windows username, might work for Mac

----------


## stcharun

Thanks for that. Well, it gives me the First Name and Last Name. But, the mac user is mostly first letter of first name followed by the last name. Well, I could use modify this to get it, but it would definitely help if I could get the mac name directly as I am not so sure if the relationship between mac name and user name would hold true for everyone. But, thanks a lot for this. 

Charun

----------


## Lifesigns

You can check the link below it provides lots of additional info for Mac. I generally use the UUID in iOS apps as they are obviously unique perhaps you could try that.

http://www.rondebruin.nl/mac.htm

----------

