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 / Programming / March 2006

Tip: Looking for answers? Try searching our database.

VBA Protection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Watson - 20 Mar 2006 09:36 GMT
I have created a timesheet that has 2 command buttons, 1 transfers dat
to a data sheet and the other clears the timesheet, but when I pu
protect sheet the VBA button won't work, what am I doing wrong???
funkymonkUK - 20 Mar 2006 09:58 GMT
in design mode select the buttons then right click go to format control
then click on the protection tab. untick the locked press ok and protec
the sheet.

I think the reason it is not working is becuase if it is locked and yo
protect it it protects the code that runs
broro183 - 20 Mar 2006 10:29 GMT
Hi Chris,

I think that your problem is more likely to be caused by the fact tha
the sheet is protected (b/c depending on the tools - protect sheet
options chosen, it is probable that the time sheet can not be cleared
rather than the property of the command buttons.

Try entering the following line of code into the "this workbook" cod
module as part of a workbook open macro:

activesheet.Protect Password:="Password", UserInterfaceOnly:=True

(I've explained it a little i
http://excelforum.com/showthread.php?t=506721 & others have explaine
it too - try searching for (UserInterfaceOnly & protect). For othe
info, search "protect method" in VBE Help or by Googling.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience..
David C - 20 Mar 2006 17:01 GMT
Or [which is simpler, and I found works well], 'Share' the workbook [ie
Tools, Share Workbook, tick the box] the save and make it Read only.

Sharing protects your macro and VB from sight/editing, and write protect
stops others turning off sharing.

> Hi Chris,
>
[quoted text clipped - 17 lines]
> NZ
> Always learning & the best way to learn is to experience...
 
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.