Sharing in Excel

  • Thread starter Thread starter soni
  • Start date Start date
S

soni

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top