+ Reply to Thread
Results 1 to 13 of 13

How to create an access log?

  1. #1
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    How to create an access log?

    HI, I am attaching a sheet which is reachable by a macro where the user is Jorge and Password is 1.
    Within the sheet appear 3 frames, 1 has access, the 2nd who is using the sheet at the time and the 3rd the registration of persons entering the sheet.

    What I want, is a macro that was connected to the frame 1 (this is not) with multiple accesses, which registers the person who is using the sheet at the time, which created a history with the records of the days and times of access the sheet.

    Thank you for help.

    Best regards, jorge.
    Attached Files Attached Files

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    I'm not exactly sure what you would like but try this: LoginRegist(1).xlsm
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Hi Solus, I was watching the sheet and makes user registration "Jorge" and notes its entry.

    But, I want the users who are in Table 1 have access to the respective passwords, and the user's log entry is saved in the Last entry generating a history.

    Thanks Solus.

    Best regards, Jorge.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    What do you mean access to table 1? The entire application is hidden unless you type in "Jorge" and "1".

  5. #5
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Hi Solus, I need to add more users to the macro and do not know it, so for example, those in Table 1 have access to the sheet.

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    I think I understand now. Try this: LoginRegist(1)(1).xlsm

  7. #7
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Hi Solus, passwords work perfect but the historical records of access does not, I made a change to the macro and i want you to see and comment.

    I could not attach the sheet, so you must copy the macro to "LoginRegist (1) (1)"

    Best regards, Jorge


    Private Sub Cancelar_Click()
    Application.Quit

    End Sub

    Private Sub Entrar_Click()
    Dim rng As Range


    With Sheets("Folha1")
    For Each rng In .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row)
    If Me.TextBox1.Value = rng.Value Then
    If Me.TextBox2.Value = rng.Offset(, 1).Value Then
    Unload UserForm1
    Application.Visible = True
    Range("D2").Value = TextBox1.Value
    Range("E2").Value = Date
    Range("F2").Value = Time
    Range("D2:F2").Select
    Selection.Copy
    Range("G1").Select
    Selection.Insert Shift:=xlDown
    Range("D4").Select
    Application.CutCopyMode = False
    Else:
    MsgBox "Either username or password is incorrect. Please try again."
    Exit Sub
    End If
    End If
    Next rng
    End With
    End Sub

    Private Sub TextBox1_Change()

    End Sub

    Private Sub UserForm_initialize()
    Application.Visible = False

    End Sub

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If CloseMode = vbFormControlMenu Then
    Cancel = True
    End If
    End Sub

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    Okay, first note: Please use code tags when posting codes. It makes the code much easier to read and keeps the forum neat. To correct this, please click 'Edit Post' under your last post, highlight the code, and press the # button in the tool bar. In the future you can press the # button in the toolbar and then paste your code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] and it will maintain formatting.

    On the second note, it looks like you're trying to put the most recent "entry" at the top of the list. What you have seems to work. Can I suggest just a small edit? It is not necessary to "select". Try:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Almost perfect, when I'm on another sheet other than Sheet1, it will record the history in this and not in Sheet1.

    You can not make a historical record only in Sheet1?

  10. #10
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Attempts to save and exit the sheet 2, when you enter will add the record in sheet 2 and not in Sheet1.

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    Fixed
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-31-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: How to create an access log?

    Perfect Solus, thank you very much for your help.

    Best regards, Jorge.

  13. #13
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to create an access log?

    Glad to help. If you are happy with the forum please mark the thread as [SOLVED] using the thread tools at the top.

+ 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. Create Access to Excel connecton via VBA
    By DYIN in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-13-2012, 08:53 AM
  2. can anyone create this screen for me in access
    By NavneetPuri in forum Access Tables & Databases
    Replies: 2
    Last Post: 02-19-2011, 09:14 AM
  3. Create MS Access Table using VBA
    By Webtekr in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2009, 05:09 AM
  4. [SOLVED] Create a pivot from CSV or access
    By Tewari in forum Excel General
    Replies: 1
    Last Post: 07-25-2006, 01:50 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