+ Reply to Thread
Results 1 to 2 of 2

Run Macro Based on Windows Username

  1. #1
    Forum Contributor
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    191

    Run Macro Based on Windows Username

    Hi All,

    I want a certain macro to run in the background (once I save down the file) if the username = a certain value. Can this be done?

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Run Macro Based on Windows Username

    You could put the code below in a module and then a simple "If UsernameWindows = "username_you_want" Then...

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How Do I User Windows Variable Username with strFilePath?
    By kitchenspoon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2016, 04:30 AM
  2. windows username
    By max_max in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-18-2013, 05:07 PM
  3. getting windows username into excel
    By Billy_E in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 12:53 PM
  4. Get Actual Windows Username
    By RedWing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2012, 08:11 PM
  5. SQL Statement WHERE User = Windows Username ID
    By JohnGaltnl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2011, 04:24 AM
  6. windows 2003 server username
    By neta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2008, 08:07 AM
  7. Windows API to get network username of person with file open
    By Paul Martin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-02-2005, 12:35 PM

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