I'm having a Workbook in which all sheets are hidden except a Base sheet "CRM_Competencies_Dashboard"
As soon as the user logs in I will pull the user id with Environ("Username")
function. Then I will store that value in a string variable "User_Name"
Now my goal is to Un-hide only that sheet.
And there are a list of users who will access this workbook. Every-time they open only their respective sheet should be visible
I tried to Un-hide the sheet by using the below function but I didn't get a way to pass the sheet name as a variable as shown below
Sub Display_User_Specific_data()
Dim User_Name As String
User_Name = Environ("Username")
ActiveWorkbook.Sheets(User_Name).Select
ActiveSheet.Visible = xlSheetVisible
End Sub
Sheets(User_Name)
should become un-hidden. And the value of variable User_Name can change for different users.