Results 1 to 5 of 5

VBA code to change the application.username and application.userinitials

Threaded View

jwlamb VBA code to change the... 01-10-2014, 07:24 PM
jwlamb Re: VBA code to change the... 01-10-2014, 09:03 PM
jwlamb Re: VBA code to change the... 01-10-2014, 10:00 PM
Kenneth Hobson Re: VBA code to change the... 01-10-2014, 10:08 PM
jwlamb Re: VBA code to change the... 01-10-2014, 11:25 PM
  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    71

    VBA code to change the application.username and application.userinitials

    I'm having issues changing the user initials with my vba code. This code works for changing the application.username, and then I would like to change the initials based on cell A41 (it runs a formula based on A40 to get initials based on Last, First).

    EDIT: I have found a way of changing it, but need help with "Find" in VBA, see comment #3 for code.

    cell A41 is
    =IF(A40="","",CONCATENATE(MID(A40, FIND(",", A40, 1) + 2, 1), LEFT(A40, 1)))
    Sub ChangeUserName()
    On Error GoTo errHandler
    Application.username = username
    Sheets("requirements").Range("A40") = Application.username
    errHandler:
    Exit Sub
    End Sub
    Thank you!
    Justin
    Last edited by jwlamb; 01-10-2014 at 10:03 PM. Reason: added formula

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Populating application username if next cell is populated- formula
    By KK1234 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-12-2013, 10:46 AM
  2. usage input box and application.username
    By jwongsf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2009, 06:23 PM
  3. Application UserName
    By talytech in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2007, 05:06 PM
  4. [SOLVED] Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)
    By Paul Martin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-05-2005, 12:05 PM
  5. Replace application.RTD property by Application.RTDServers collect
    By John.Greenan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2005, 10:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1