Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

How to protect desired area of workbook and protect code.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
avveerkar - 12 Jan 2006 05:06 GMT
I have created a small game with a worksheet displaying different colors
etc. in different cells and a few buttons on the sheet. Buttons have
their codes associated with them in the modules. Player has to choose
some cells, enter some data only in some particular cells marked for
the purpose and then click a button. This is very simple. I want
someone to tell me how I can save this workbook with all its associated
macros etc so that I can give a copy to anyone who can play the game but
cannot access the code, cannot change the format of the main sheet or
cannot change/edit any cell he is not required to and enter only those
cells to which access is required. I know this must be very elementary
but I am not able to achieve this. I work with XP and EXCEL2000. I have
seen simple quizzes in EXCEL where we have to give correct answers in a
particular column and it gives you score for correct answer. Except the
particular column the whole sheet is protected. You cannot edit any
other cell nor you can access the codes.

A V Veerkar

Signature

avveerkar

Dave Peterson - 12 Jan 2006 12:40 GMT
You can protect the project within the VBE.
Tools|VBAProject Properties|Protection tab
give it a memorable password.

You can protect worksheets within excel.
tools|protection|protect sheet

Be aware that this kind of protection is easily broken--but it's the best you
can do if you stay within excel.

> I have created a small game with a worksheet displaying different colors
> etc. in different cells and a few buttons on the sheet. Buttons have
[quoted text clipped - 19 lines]
> avveerkar's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30338
> View this thread: http://www.excelforum.com/showthread.php?threadid=500506

Signature

Dave Peterson

avveerkar - 12 Jan 2006 13:56 GMT
Dave Peterson Wrote:
> You can protect the project within the VBE.
> Tools|VBAProject Properties|Protection tab
[quoted text clipped - 8 lines]
>
> Dave Peterson

Thanks Dave but this doesn't help. If I protect the sheet I canno
modify any cell manually or by macros which my game needs to do. If
"unlock" the cells ( which I want to write through macros or manuall
as required by the game ) before I protect the sheet, I am only allowe
to change the contents of the "unlocked" cells but not formatting etc.
need full access to change contents, formatting. In brief, all the cell
on the sheet which are not required to be changed while playing the gam
should be fully locked but all the cells which get modified by macros o
by the player should be fully accessible for changing values as well a
formatting.

Thanks
A V Veerka
Dave Peterson - 12 Jan 2006 14:24 GMT
xl2002 offered a lot more options when the worksheet is protected--you can allow
formatting changes, insertion/deletion of rows/columns.  xl2002+ gives you much
more control.

If you're using xl2k or below, the most common suggestion would be to give the
users a set of macros that allow them to do only what you want.  Your macros can
unprotect the sheet, do the work, and reprotect the sheet.

> Dave Peterson Wrote:
> > You can protect the project within the VBE.
[quoted text clipped - 29 lines]
> avveerkar's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30338
> View this thread: http://www.excelforum.com/showthread.php?threadid=500506

Signature

Dave Peterson

avveerkar - 13 Jan 2006 02:44 GMT
Dave Peterson Wrote:
> xl2002 offered a lot more options when the worksheet is protected--you
> can allow
[quoted text clipped - 13 lines]
>
> A V Veerkar

Signature

avveerkar

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.