Hi
I have a sheet that hides all but the Welcome Sheet on Opening. Then people enter a user name & Password, and it makes their sheet visible.
I just now added a sheet called "Inv Usage" (Or sheet6), and i would like to display it ALL the time. So whoever opens the workbook see THEIR sheet plus this one. I added a piece of code at the end like this;
"Sheets("Inv Usage").Activate"
Its not working. I have also tried;
"With Sheets("Inv Usage")
.Visible = xlSheetVisible
.Activate
End With"
Also not working.
Here is my entire code;
Sub OpenTimecard()
Sheets("Welcome").Activate
If Range("SheetSelector") = "" Then
MsgBox ("Please enter Username & Password!")
Else
If Range("SheetSelector") = "Error!" Then
MsgBox ("Username Password error!")
Else
With Sheets(Range("SheetSelector").Value) 'Index+Match result of WS name
.Visible = xlSheetVisible
.Activate
End With
End If
End If
ClearWelcome 'Clears UserName & Password
Sheets("Inv Usage").Activate
End Sub
What am i doing wrong? and also, is this code cumbersome?
I have a sheet that hides all but the Welcome Sheet on Opening. Then people enter a user name & Password, and it makes their sheet visible.
I just now added a sheet called "Inv Usage" (Or sheet6), and i would like to display it ALL the time. So whoever opens the workbook see THEIR sheet plus this one. I added a piece of code at the end like this;
"Sheets("Inv Usage").Activate"
Its not working. I have also tried;
"With Sheets("Inv Usage")
.Visible = xlSheetVisible
.Activate
End With"
Also not working.
Here is my entire code;
Sub OpenTimecard()
Sheets("Welcome").Activate
If Range("SheetSelector") = "" Then
MsgBox ("Please enter Username & Password!")
Else
If Range("SheetSelector") = "Error!" Then
MsgBox ("Username Password error!")
Else
With Sheets(Range("SheetSelector").Value) 'Index+Match result of WS name
.Visible = xlSheetVisible
.Activate
End With
End If
End If
ClearWelcome 'Clears UserName & Password
Sheets("Inv Usage").Activate
End Sub
What am i doing wrong? and also, is this code cumbersome?