vba Help

needhelp2

Active Member
Joined
Apr 19, 2011
Messages
250
Hello,

1st of all i really thanks full to all of you peoples who always assist me with their Best-of-Best assignments when ever i need that.I feels pleasure to be a very little part of this forum.Specially when i look into profiles of MPV's i love to ready every think about excel.

Today i am trying to get login user name in windows XP SP2,SP3.Kindly tell me how i can get that by using VBA in excel 2003,2007,2010.


Thanks in Advance.

Smith.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this:
Code:
Sub UserName()
Dim strUser As String
    strUser = Environ("username")
End Sub
Dear jongooliganThanks for your reply Buddy,That's great its really 110% worked same as i need.
Kindly guide me some fast and quick way for learning vba for excel as i am learning from different sources but i think i have to move learn faster.
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top