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

charting with excelusing vba functions in excelword vba message boxhow to delete macros in exceldata analyst interview questions and answers for freshersroot cause analysis template excelboolean vbaexcel macros usesfte analysis templatevba modellingwhere is developer tab in excel 2013vba codes for accessmsgbox hello worldvba graphexcel vba delete sheetdocmd.runsql deleteinsert row excel macroexcel project dashboard templatedata analysis add in excel 2007ms excel 2007 formulas with examples pdf in hindiexcel graph titleexcel 2003 find duplicatesiserrcopy excel sheet to new workbookpivot table formulas excel 2010macro creation in excelcountif function excelvba dim string arrayhow to extend columns in excelhow to remove duplicate records in excelmultiselect exampleexcel vba copy sheethow do i hide a column in excelexcel hidden columnssql queries interview questions and answers pdf for fresherssimple vlookup formula in excelexcel macro variableexcel vba comboboxdeveloper ribbon excelif statement in vbaexcel advancedfilteractivecell rangeautomation testing interview questions and answers pdfunhide column excelunprotect sheet excelunhide excel columnshow to insert title in exceldelete duplicates excelvbs create text fileaccess vba checkboxexcel macro text boxexcel find duplicates in a listhow to unhide a tab in excel 2010insert button vbaexcel vba column widthexcel vba unload mevba errorexcel automatic row heightexcel vba code libraryvba open fileexcel formula hidehow to put countif formula in excelacspreadsheettypeexcel12how to remove excel formulaxl vba tutorialbutton vbahow to write a query in excelexcel macro msgboxexcel double if statementc programming interview questions and answers for freshers pdfmicrosoft excel hyperlink