O
OsmoseTom
The workbook I created contains 40 tabs. There is one for each department
and an instruction tab. I have setup a macro to hide all the tabs except the
Instruction upon opening the workbook. My company has 14 different
department managers. Each one is responsible only for their assigned
departments. I have created 14 macros to make their assigned tabs visible.
I would like to run the macros based on entry into a cell. My idea is to
have 14 different passwords. Each manager would have to key in their
password then the appropriate macro would run to show the corresponding tabs.
This is the code I have so far.
Private Sub Worksheet_Change(ByVal Target As Range)
Set c2 = Range("C2")
Set t = Target
If Intersect(t, c2) Is Nothing Then Exit Sub
v = c2.Value
If v = "FN103179" Then
Call Finance
If v = "MP101982" Then
Call ComputerSupport
End If
If c = "BB164977" Then
Call Payroll
End If
End If
End Sub
The Finance macro runs after entering FN103179 in cell 2. However the other
macros do not run after entering their passwords.
Please tell me what I am doing wrong.
Thanks.
and an instruction tab. I have setup a macro to hide all the tabs except the
Instruction upon opening the workbook. My company has 14 different
department managers. Each one is responsible only for their assigned
departments. I have created 14 macros to make their assigned tabs visible.
I would like to run the macros based on entry into a cell. My idea is to
have 14 different passwords. Each manager would have to key in their
password then the appropriate macro would run to show the corresponding tabs.
This is the code I have so far.
Private Sub Worksheet_Change(ByVal Target As Range)
Set c2 = Range("C2")
Set t = Target
If Intersect(t, c2) Is Nothing Then Exit Sub
v = c2.Value
If v = "FN103179" Then
Call Finance
If v = "MP101982" Then
Call ComputerSupport
End If
If c = "BB164977" Then
Call Payroll
End If
End If
End Sub
The Finance macro runs after entering FN103179 in cell 2. However the other
macros do not run after entering their passwords.
Please tell me what I am doing wrong.
Thanks.