Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have sent 2006 Budget worksheets to all my franchises, who have entered
data already. I've added some features that I want them to use and want to copy their data into the new worksheet. I also want to create macro that writes a statement in a protected field. All the sheets are protected with a password I do not want them to knowm but they do have access to certain cells to enter their data. When I send the new worksheet, I want to create a macro that copies their data and then writes that the import is done. How can I use the macro to unprotect a sheet, write the statement, protect the sheet again, and make sure they do not have access to the password? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is no absolutely foolproof way to ensure taht they can not get access
the the password. There are any number of code solutions to crack password. That being said assuming the the users are not fiendish then yo just need to lock the project int the VBE. Right click the project and select security. check to hide the code and add a password. Here is some code for you... Sub ImportData() Dim wksCopyfrom as worksheet dim wksCopyto as worksheet set wskcopyfrom = sheets("Sheet1") set wskcopyto = sheets("Sheet2") wkscopyfrom.unprotect "MyPassword" wkscopyto.unprotect "MyPassword" wkscopyfrom.range("A1").copy wkscopyto.range("A1") wkscopyfrom.protect "MyPassword" wkscopyto.protect "MyPassword" end Sub -- HTH... Jim Thomlinson "David" wrote: I have sent 2006 Budget worksheets to all my franchises, who have entered data already. I've added some features that I want them to use and want to copy their data into the new worksheet. I also want to create macro that writes a statement in a protected field. All the sheets are protected with a password I do not want them to knowm but they do have access to certain cells to enter their data. When I send the new worksheet, I want to create a macro that copies their data and then writes that the import is done. How can I use the macro to unprotect a sheet, write the statement, protect the sheet again, and make sure they do not have access to the password? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Good morning David Alternatively this line will enable macros to write to protected cells and users not to. Activesheet.Protect UserInterfaceOnly=True HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=486609 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I unlock the excell password protected file? | Excel Discussion (Misc queries) | |||
How do I unlock a protected worksheet | Excel Worksheet Functions | |||
How do i unlock protected worksheets? | Excel Worksheet Functions | |||
How do I unlock specific cells in a spreadsheet that I protected? | Excel Discussion (Misc queries) | |||
How do I unlock a spreadsheet that is password protected? | Excel Worksheet Functions |