Limit who can use the Shipments sheet.
This commit is contained in:
parent
1cf13e4f57
commit
1505221961
@ -7,3 +7,13 @@ Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = True
|
||||
Private Sub Workbook_Open()
|
||||
Dim adjuster As Variant
|
||||
For Each adjuster In shConfig.ListObjects("ShipDateAdjusters").DataBodyRange
|
||||
If adjuster = Environ("USERNAME") Then
|
||||
shShipments.Visible = xlSheetVisible
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
shShipments.Visible = xlSheetVeryHidden
|
||||
End Sub
|
||||
|
||||
@ -14,6 +14,7 @@ Private Sub Worksheet_Change(ByVal Target As Range)
|
||||
|
||||
If shConfig.Range("debug_mode").value Then
|
||||
shConfig.Visible = xlSheetVisible
|
||||
shShipments.Visible = xlSheetVisible
|
||||
'shData.Visible = xlSheetVisible
|
||||
shMonthView.Visible = xlSheetVisible
|
||||
shMonthUpdate.Visible = xlSheetVisible
|
||||
@ -21,6 +22,7 @@ Private Sub Worksheet_Change(ByVal Target As Range)
|
||||
shWalk.Visible = xlSheetVisible
|
||||
Else
|
||||
shConfig.Visible = xlSheetVeryHidden
|
||||
shShipments.Visible = xlSheetVeryHidden
|
||||
'shData.Visible = xlSheetHidden
|
||||
shMonthView.Visible = xlSheetHidden
|
||||
shMonthUpdate.Visible = xlSheetVeryHidden
|
||||
|
||||
Loading…
Reference in New Issue
Block a user