B
bstone
I am trying to insert the username into named cells on two worksheets i
the same workbook.
I only want to insert the username if the named cell is blank.
I can insert the names into the correct cells with the following:
(Which is probly very clunky)
With Worksheets("ILTimesheet")
.Range("ILName") = Application.UserName
End With
With Worksheets("AOETimeSheet")
.Range("EmpName") = Application.UserName
End With
But....
I only want to insert the username if the cells ("EmpName" and ILName
are blank.
I think I need to do some sort of IF and IsEmpty but can't seem to ge
it
the same workbook.
I only want to insert the username if the named cell is blank.
I can insert the names into the correct cells with the following:
(Which is probly very clunky)
With Worksheets("ILTimesheet")
.Range("ILName") = Application.UserName
End With
With Worksheets("AOETimeSheet")
.Range("EmpName") = Application.UserName
End With
But....
I only want to insert the username if the cells ("EmpName" and ILName
are blank.
I think I need to do some sort of IF and IsEmpty but can't seem to ge
it