Hi all
I have the code below in "ThisWorkbook" which I want to run each time the document opens.
Can anyone help me understand why the code does not work when opening a document but does when I press Run Sub?
Thanks
Milan
I have the code below in "ThisWorkbook" which I want to run each time the document opens.
VBA Code:
Private Sub Workbook_Open()
ThisWorkbook.Sheets("ActiveUser").Range("B6").Value = Environ("USERNAME")
End Sub
Can anyone help me understand why the code does not work when opening a document but does when I press Run Sub?
Thanks
Milan