+ Reply to Thread
Results 1 to 4 of 4

automatically putting username into a cell

Hybrid View

  1. #1
    Registered User
    Join Date
    01-04-2007
    Posts
    3

    automatically putting username into a cell

    I'm creating a booking form, and it needs a "staff name" feild.

    I want it to automatically put the username which is found under tools-options-general, and this will then be locked so the user cannot change it.

    I have done a search on here but have found nothing that works, any help appreciated. & bare in mind i hardly know anything about VB etc so something simple would be nice
    thanks!

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by becka
    I'm creating a booking form, and it needs a "staff name" feild.

    I want it to automatically put the username which is found under tools-options-general, and this will then be locked so the user cannot change it.

    I have done a search on here but have found nothing that works, any help appreciated. & bare in mind i hardly know anything about VB etc so something simple would be nice
    thanks!
    Hi,

    For point 1 you would use a trigger, probably the starting of your form, and on this trigger, code similar to

    Range("A1").Value = Application.UserName

    For point 2 you were just dreaming. There are a number of 'protections', but nothing terribly serious.
    Most probable would be that VBA code Protects the sheet with a password, it's not perfect but should suit your needs.

    note, it's 'bear in mind' - we try to keep the Forum a respectable place for young people to visit.

    hth
    ---
    Last edited by Bryan Hessey; 01-04-2007 at 08:54 AM.
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    01-04-2007
    Posts
    3
    thanks for the reply - but none of that makes any sense to me!
    i have really never done anything like this before, my knowledge of excel only stretches to conditional formatting.

    i have found this online... http://www.j-walk.com/ss/excel/tips/tip94.htm i don't know where i would put the code though. and how i go about doing it. im trying to find step by step instructions for dummies like me but can't find anything!

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by becka
    thanks for the reply - but none of that makes any sense to me!
    i have really never done anything like this before, my knowledge of excel only stretches to conditional formatting.

    i have found this online... http://www.j-walk.com/ss/excel/tips/tip94.htm i don't know where i would put the code though. and how i go about doing it. im trying to find step by step instructions for dummies like me but can't find anything!
    http://www.danielklann.com/tutorials/tutorial_index.htm might be a place to start.

    for a userform:
    http://www.contextures.com/xlUserForm01.html

    For a 'form':
    rightmouse the worksheet tab, and select View Code.

    Insert, Userform, and add labels and Textboxes to suit your needs.

    Whilst there are many sample Userforms, only the only you design will suit your needs, and they are not difficult.

    Let us know how you progress with your form.
    ---

+ 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