I'm trying to create a variable that is stored after a user's input when opening the workbook, and that should be available for all modules and subs afterward without any further input or note.
I have tried this so far, but I always get a message error:
Private Sub Workbook_Open()
Public UserID As String
UserID = InputBox("Please insert your username")
End Sub
After, that UserID should be automatically replaced by the inserted value in a different Sub and Module at the following step:
Path = "C:\Users\" & UserID & "....xlsm"
Instead, I get an error message that the Path could not be found due to the missing UserID value.
Any Idea how to resolve this?