![]() |
ActiveWorkbook.VBProject
How would one programmitacally protect/unprotect a VBProject?
|
ActiveWorkbook.VBProject
Hi IT_Roofer,
I do not think that Excel provides any support for this. If you perform a ggogle search of the NG archives, you will find suggestions for the use of the SendKeys method, but this can be problematic -- --- Regards, Norman "IT_roofer" wrote in message ... How would one programmitacally protect/unprotect a VBProject? |
ActiveWorkbook.VBProject
"Norman Jones" wrote in news:
on Tue 05 Jun 2007 01:03:20p: Hi IT_Roofer, I do not think that Excel provides any support for this. If you perform a ggogle search of the NG archives, you will find suggestions for the use of the SendKeys method, but this can be problematic I don't think that anyone here (at my work) has enough know-how to even get into the VBAProject to hurt anything, but I don't want to take that chance. Is there a way to keep Excel from keeping the project protection from transferring over to the new workbook? |
ActiveWorkbook.VBProject
Hi Atomic Storm (IT_Roofer?),
If you create a copy of the workbook, the protection status of the original file will be assumed by the new copy. Therefore, if the copy file is not to have its VBA project protected, I think that you would need to remove the protection from the original - at least temporariily. --- Regards, Norman "Atomic Storm" wrote in message 8.16... "Norman Jones" wrote in news: on Tue 05 Jun 2007 01:03:20p: Hi IT_Roofer, I do not think that Excel provides any support for this. If you perform a ggogle search of the NG archives, you will find suggestions for the use of the SendKeys method, but this can be problematic I don't think that anyone here (at my work) has enough know-how to even get into the VBAProject to hurt anything, but I don't want to take that chance. Is there a way to keep Excel from keeping the project protection from transferring over to the new workbook? |
ActiveWorkbook.VBProject
"Atomic Storm" is the difference between a news reader and the Office
Website ;) I you are right, but that brings us right back to the beginning: how to remove the protection to allow the macro code to execute the removal of VB code. At that point, it wouldn't matter if there was project protection because all the vitals would be gone. So I guess I just want to be able to remove the worksheet code and only re-establish sheet protection. The later of which is the easy part. Do you think it would feasable to have a macro that would close the VBE if it were opened instead of applying VBProject protection? "Norman Jones" wrote in on Tue 05 Jun 2007 02:00:30p: Hi Atomic Storm (IT_Roofer?), If you create a copy of the workbook, the protection status of the original file will be assumed by the new copy. Therefore, if the copy file is not to have its VBA project protected, I think that you would need to remove the protection from the original - at least temporariily. --- Regards, Norman "Atomic Storm" wrote in message 8.16... "Norman Jones" wrote in news: on Tue 05 Jun 2007 01:03:20p: Hi IT_Roofer, I do not think that Excel provides any support for this. If you perform a ggogle search of the NG archives, you will find suggestions for the use of the SendKeys method, but this can be problematic I don't think that anyone here (at my work) has enough know-how to even get into the VBAProject to hurt anything, but I don't want to take that chance. Is there a way to keep Excel from keeping the project protection from transferring over to the new workbook? |
ActiveWorkbook.VBProject
Hi Atomic Storm,
I you are right, but that brings us right back to the beginning: Therefore, look at Tom Ogilvy's post of code from Bill Manville: Setting VBA passwords from within code http://tinyurl.com/2grtgo --- Regards, Norman "Atomic Storm" wrote in message 8.16... "Atomic Storm" is the difference between a news reader and the Office Website ;) I you are right, but that brings us right back to the beginning: how to remove the protection to allow the macro code to execute the removal of VB code. At that point, it wouldn't matter if there was project protection because all the vitals would be gone. So I guess I just want to be able to remove the worksheet code and only re-establish sheet protection. The later of which is the easy part. Do you think it would feasable to have a macro that would close the VBE if it were opened instead of applying VBProject protection? "Norman Jones" wrote in on Tue 05 Jun 2007 02:00:30p: Hi Atomic Storm (IT_Roofer?), If you create a copy of the workbook, the protection status of the original file will be assumed by the new copy. Therefore, if the copy file is not to have its VBA project protected, I think that you would need to remove the protection from the original - at least temporariily. --- Regards, Norman "Atomic Storm" wrote in message 8.16... "Norman Jones" wrote in news: on Tue 05 Jun 2007 01:03:20p: Hi IT_Roofer, I do not think that Excel provides any support for this. If you perform a ggogle search of the NG archives, you will find suggestions for the use of the SendKeys method, but this can be problematic I don't think that anyone here (at my work) has enough know-how to even get into the VBAProject to hurt anything, but I don't want to take that chance. Is there a way to keep Excel from keeping the project protection from transferring over to the new workbook? |
ActiveWorkbook.VBProject
"Norman Jones" wrote in news:
on Tue 05 Jun 2007 03:00:08p: http://tinyurl.com/2grtgo I got an idea while I was reading that post and it worked. Here's what I did: On Sheet2 I used the WorkSheet_Activate() routine to check for file name... if ThisWorkbook.Name < "MyWorkbookName" then Application.EnableEvents = False ....it seemd to do the trick. I'm going to keep looking into the SendKeys thing though... seems interresting. Thanks for the help, Norman. I really do appreciate your patience :) Have a good evening. |
All times are GMT +1. The time now is 12:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com