Have a login details on Sheet1 as follow
Sheet1
<tbody>
</tbody>
I have the follow code at the amount
Current Code :-
Option Explicit
Sub CheckUser()
Dim UserRow, SheetCol As Long
Dim SheetNm As String
With Sheet8
.Calculate
If .Range("A10").Value = Empty Then 'Incorrect Username
MsgBox "Please enter correct user name"
Exit Sub
End If
If .Range("A9").Value <> True Then 'incorrect password
MsgBox "Please enter correct password"
Exit Sub
End If
Range("A7").Copy Range("A1") 'copy Username to A1
LoginForm.Hide 'Hide Login Form
UserRow = .Range("A10").Value ' User Row
.Range("A7,A8").ClearContents
How can i capture the username in A7 and place it at A1. A1 will have to update with new username whenever a new user sign in.
I have try adding this code to the existing code but it didnt work properly.
range ("A7").copy range ("A1")
Would appreciate if anyone can help me out on this.
Thanks
Sheet1
A | B | C | D | E | F |
User Name | password | ||||
Anna | 12565 | ||||
Login | James | 65234 | |||
Jimmy | Susan | 65845 | |||
12356 | Michael | 33654 | |||
Jimmy | 12356 | ||||
Koda | 88751 | ||||
<tbody>
</tbody>
I have the follow code at the amount
Current Code :-
Option Explicit
Sub CheckUser()
Dim UserRow, SheetCol As Long
Dim SheetNm As String
With Sheet8
.Calculate
If .Range("A10").Value = Empty Then 'Incorrect Username
MsgBox "Please enter correct user name"
Exit Sub
End If
If .Range("A9").Value <> True Then 'incorrect password
MsgBox "Please enter correct password"
Exit Sub
End If
Range("A7").Copy Range("A1") 'copy Username to A1
LoginForm.Hide 'Hide Login Form
UserRow = .Range("A10").Value ' User Row
.Range("A7,A8").ClearContents
How can i capture the username in A7 and place it at A1. A1 will have to update with new username whenever a new user sign in.
I have try adding this code to the existing code but it didnt work properly.
range ("A7").copy range ("A1")
Would appreciate if anyone can help me out on this.
Thanks