![]() |
Shared Workbook - Hiding rows as per Username
Hi,
How can i hide certain rows for certain users & make visible only rows belonging to certain Users (having their names in cells) using VBA, whenever the users open the Shared Workbook? eg. If application.Username="sheikh" then with worksheets("Sheet1") .range("c1").visible= true ' C1 contains my name as "Eijaz" .range("c12").visible= false ' C12 contains other users name say "Jack" .range("c18").visible= false ' C18 contains other users name say "Jill" end with else if application.Username="jackv" then with worksheets("Sheet1") .range("c12").visible= true' C12 contains other users name say as "Jack" .range("c1").visible= false ' C1 contains my name "Eijaz" .range("c18").visible= false ' C18 contains other users name say "Jill" end with else if application.Username="jillm" then with worksheets("Sheet1") .range("c18").visible= true' C18 contains other users name say as "Jill" .range("c1").visible= false ' C1 contains my name "Eijaz" .range("c12").visible= false ' C12 contains other users name say "Jack" end with end if .......... does not seem to work as i think when i open Tools Share Workbook all the 3 names are listed. Any help would really be appreciated! Rgds, Eijaz |
All times are GMT +1. The time now is 05:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com