R
ryguy7272
I can’t see what’s wrong with this:
Range("J1").Select
Selection = "=ReturnUserName()" ‘I have a UDF above this line; not
copied here.....
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
End If
Rows("1:1").Select
Selection.AutoFilter
If Range("J1").Text = hsmith Then
Sheets("Sheet").Select
Range("A1").Cells = 3
Else
MsgBox ("Unauthorized.")
Sheets("Sheet").Select
Exit Sub
End If
'At this point, I would expect to get a 3 in Cell A1 on Sheet “Sheetâ€, but I
don't!!
The value in J1 is hsmith but the sub always gives me the message box.
If I put something like:
If Range("J1").Text = hsmith = wellis Then
‘ so on and so forth
I get a 3 in Cell A1 on Sheet “Sheetâ€. This seems illogical!!
What am I doing wrong?
Thanks,
Ryan---
Range("J1").Select
Selection = "=ReturnUserName()" ‘I have a UDF above this line; not
copied here.....
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
End If
Rows("1:1").Select
Selection.AutoFilter
If Range("J1").Text = hsmith Then
Sheets("Sheet").Select
Range("A1").Cells = 3
Else
MsgBox ("Unauthorized.")
Sheets("Sheet").Select
Exit Sub
End If
'At this point, I would expect to get a 3 in Cell A1 on Sheet “Sheetâ€, but I
don't!!
The value in J1 is hsmith but the sub always gives me the message box.
If I put something like:
If Range("J1").Text = hsmith = wellis Then
‘ so on and so forth
I get a 3 in Cell A1 on Sheet “Sheetâ€. This seems illogical!!
What am I doing wrong?
Thanks,
Ryan---