View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Filter Excel bases on the current user

You need the network name, so use

environ("UserName")

Use like

Select Case Environ("UserName")
Case "Bob"
Rows("1:2").hidden=true
Case "Jim"
Rows("1:24").hidden=true
End Select

--
HTH

Bob Phillips

"Keith H" <Keith wrote in message
...
I need to hide rows in an Excel spredsheet based on who opened it.

How can I get the user ID or login name and how can I use this information
to hide rows?