magnum0357
New Member
- Joined
- Feb 8, 2009
- Messages
- 29
OS = xp home
Excel 2000
I have the following code :
Private Sub CommandButton2_Click()
Dim Response As String
Response = InputBox("Please enter a Password", "Password Required")
Select Case Response
Case Sheet2.Cells(3, 7)
Application.Goto Reference:=['Sheet22'!A1]
Case Is <> Sheet2.Cells(3, 7)
MsgBox "You need a password to access this information", _
vbCritical + vbOKOnly, "Access Denied"
Sheet2.Range("A1").Select
End Select
End Sub
When sheet22 is activated it is supposed to run this code :
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Dim rgn1 As Range
Dim cell As Range
Set rng1 = Range("F8:F1173")
For Each cell In rng1
If cell.Value <> "a" Then
cell.EntireRow.Hidden = True
Else
cell.EntireRow.Hidden = False
End If
Next
Application.ScreenUpdating = True
End Sub
It worked before I placed the password code, but now it doesn't, it takes me to the correct sheet and doesn't give anytype of error, it's kinda like the code is turned off......???
Can anyone help
Excel 2000
I have the following code :
Private Sub CommandButton2_Click()
Dim Response As String
Response = InputBox("Please enter a Password", "Password Required")
Select Case Response
Case Sheet2.Cells(3, 7)
Application.Goto Reference:=['Sheet22'!A1]
Case Is <> Sheet2.Cells(3, 7)
MsgBox "You need a password to access this information", _
vbCritical + vbOKOnly, "Access Denied"
Sheet2.Range("A1").Select
End Select
End Sub
When sheet22 is activated it is supposed to run this code :
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Dim rgn1 As Range
Dim cell As Range
Set rng1 = Range("F8:F1173")
For Each cell In rng1
If cell.Value <> "a" Then
cell.EntireRow.Hidden = True
Else
cell.EntireRow.Hidden = False
End If
Next
Application.ScreenUpdating = True
End Sub
It worked before I placed the password code, but now it doesn't, it takes me to the correct sheet and doesn't give anytype of error, it's kinda like the code is turned off......???
Can anyone help