UserName Property of Application Object VBA

UserName Application Property in VBA is used to sets or returns the name of the user. Please find the more details about UserName in the following section.



50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates

VBA UserName Application Property – Syntax

Here syntax for UserName Property of application object in VBA.

Application. UserName

Where UserName as String.
In the above syntax Application represents object and UserName is the Property of Application object.

VBA UserName Application Property: Example 1

Please find the below example for UserName Property of application object in excel VBA. The below example displays the user name of the application.

Sub Appl_UserNamel()
MsgBox Application.UserName
End Sub

VBA UserName Application Property – Instructions

Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel Application.
Step 2: Press Alt+F11 – This will open the VBA Editor.
Step 3: Insert a code module from then insert menu.
Step 4: Copy the above code and paste in the code module which have inserted in the above step.
Step 5: Now press F5 to execute the code.


Leave A Comment

Related pages

excel vba loophlookup excel functionmastering excel 2010vba diraccess vba queryvba excel saveas overwritedeclare variables vbaexcel vba connectionunprotect excel sheetsspreadsheet control vbadisplay message box vbavlookup refexcel formula to check for duplicatesaccess 2010 vba recordsetadd a developer tab to the ribbonexcel macro savevba msgbox buttonscount number of rows in excel vbavlookup using 2 criteriavb programs examplesvba average functionmicrosoft excel functions tutorialvba excel switchusing vlookup functionhow do you create a macro in excel 2010import worksheet excelcan you unprotect an excel spreadsheetvba case orexcel 2010 chart wizardtcl in sql serverlocation of personal xlsbrange variable vbavba add hyperlinkremove duplicates from list excelddl languagedelete columns excelexcel vba divisionexcel macro copy pastehow to unhide hidden rows in excelexcel dashboard pluginmacro for vlookuphow to unhide column in excelvba excel isemptyexcel vba selection objecthow to connect cells in excelexcel all formulas with example 2007excel password workbookexcel hyperlink vbacreating a check box in excelhow do you remove duplicates in excelvba dim rangedml and ddl in sqlexcel template schedule plannerdata analysis tab in excel 2007excel 2003 advanced filterexamples for vlookup in excelrange in excel vbaexcel chart titledrop column syntaxvba advanced tutorialexcel vba clear contents of rangevba code to export access query to excelcopy worksheet excelhow do i hide columns in excelmerge columns in excelvba sort excelexcel vba sql queryinsert a macro in excelexcel vba replace functionrca template wordexcel duplicate finderhow do i filter out duplicates in excel