Professional Documents
Culture Documents
Macros For Checklist UPDATED
Macros For Checklist UPDATED
Sub FillOneCellAtATimeCol3()
ActiveSheet.Unprotect Password:=""
Dim username As String
username = Environ("Username")
' Loop through the row to check if the username already exists
Do While Not IsEmpty(currentCell.Value)
If currentCell.Value = username Then
IsUsernameInRow = True
Exit Function
End If
Set currentCell = currentCell.Offset(0, 1)
Loop
IsUsernameInRow = False
End Function
Else
' No data in cells E3 to L29, provide a message or take appropriate action
MsgBox "UID-NAME POPULATION REJECTED. Error: Incomplete Checklist.",
vbExclamation
End If
ActiveSheet.Protect Password:=""
End Sub
Sub PopulateManagerInfo()
ActiveSheet.Unprotect Password:=""
Dim ws1 As Worksheet, ws2 As Worksheet
Dim employeeID As String, managerID As String, managerName As String
Dim teamRange As Range, teamMember As Range
Dim currentUser As String
' Set references to the worksheets
Set ws1 = ThisWorkbook.Sheets("Sheet1")
Set ws2 = ThisWorkbook.Sheets("Sheet2")
Call PopulateNamesWithHyphen
Sub ClearContentBySystemUser()
Dim ws As Worksheet
Dim targetRow As Range
Dim currentUser As String
Dim cell As Range