Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Protection


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

--
Chris Watso
-----------------------------------------------------------------------
Chris Watson's Profile: http://www.excelforum.com/member.php...nfo&userid=470
View this thread: http://www.excelforum.com/showthread.php?threadid=52425

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Protection


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

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=52425

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Protection


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

--
broro18
-----------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...fo&userid=3006
View this thread: http://www.excelforum.com/showthread.php?threadid=52425

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA Protection

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.

"broro183" wrote:


Hi Chris,

I think that your problem is more likely to be caused by the fact that
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" code
module as part of a workbook open macro:

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

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

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=524255


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
WS Protection: Different Levels of Protection on Different Ranges Carmi Excel Discussion (Misc queries) 4 August 31st 07 02:26 PM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"