+ Reply to Thread
Results 1 to 5 of 5

Auto insert of Username in a set cell

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    876

    Auto insert of Username in a set cell

    Good evening happy campers,

    I have a workbook with 4 tabs.

    On the tab named 'Requests' i want excel to automatically insert my windows login name into cell A1 on the requests tab as soon as i open the workbook.
    And at present it's killing me lol
    So far i have the following -
    Please Login or Register  to view this content.
    But this does not work

    Thanks in advance, galvinpaddy.
    Last edited by galvinpaddy; 03-22-2012 at 04:42 PM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Auto insert of Username in a set cell

    hi,
    it works for me, check the Sheet's name...
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Auto insert of Username in a set cell

    Did you place the code in "Thisworkbook" object?
    Is your workbook saved as an xls or xlsm?
    Did you enable macros when you opened the workbook?

    I checked and if you did those three things, your code works.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    876

    Re: Auto insert of Username in a set cell

    HA, lord only knows what i was doing, as it does work??!!
    Not entirely sure how or why, all i did was close excel (had many w.books open) then re-opened, and bam - works.
    However, thanks for the input!

  5. #5
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    876

    Re: Auto insert of Username in a set cell

    @ChemistB
    Apologies, i had not entered the code into "Thisworkbook" object which is why it didnt work, thank-you for your unput!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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