View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
rdwj rdwj is offline
external usenet poster
 
Posts: 95
Default Sharing in Excel

Soni,

Your problem is user identification. Can you rely on user input for
identification, then a simple VB dialog box suffices. Alternative can be to
read the username under Tools, Options, General (VB code
"Application.Username")

Based on the id, you can protect the cells using
ActiveWorkbook.Unprotect
ActiveSheet.Unprotect
Columns("A:C").Locked = False
ActiveSheet.Protect
ActiveWorkbook.Protect

A simple "Tools - Macro - Record" will give you the full code.

Another alternative can be that you create a button that switches between
entry only in Col A:C and entry only in Col D:F



"soni" wrote:

I want to share a excel file on my PC such that user 1 on lan can edit
some columns (Lets say Column A & column B) but cannot edit other
columns and user 2 can edit some other columns (lets say column C &
column D) but cannot edit other columns.