Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
Hello,
I've read dozens of posts regarding this issue however, I am at a loss. It is mandatory that I have the worksheet protected so that data is only entered via VB userform. I have tried the Workbook_Open() and it is not being executed. I replaced the code with a MsgBox and confirmed it is not being run. The macro is being invoked via mouseclick (no shift key). Where else would I place UserInterfaceOnly? Thanks, Richard |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
Send us the code and let us know where you are placing it?
"Richard" wrote: Hello, I've read dozens of posts regarding this issue however, I am at a loss. It is mandatory that I have the worksheet protected so that data is only entered via VB userform. I have tried the Workbook_Open() and it is not being executed. I replaced the code with a MsgBox and confirmed it is not being run. The macro is being invoked via mouseclick (no shift key). Where else would I place UserInterfaceOnly? Thanks, Richard |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
If you are using xl2002 or later and your security is set to high, then
macros are disabled without warning unless you have certified your code and your certification has been accepted as a trusted source. If that is what is happening, then I doubt using some other approach is going to overcome it. -- Regards, Tom Ogilvy "Richard" wrote in message ... Hello, I've read dozens of posts regarding this issue however, I am at a loss. It is mandatory that I have the worksheet protected so that data is only entered via VB userform. I have tried the Workbook_Open() and it is not being executed. I replaced the code with a MsgBox and confirmed it is not being run. The macro is being invoked via mouseclick (no shift key). Where else would I place UserInterfaceOnly? Thanks, Richard |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
Private Sub Workbook_Open()
MsgBox "It Works!" End Sub I don't quite understand the question, placing it? It is in my main code window. "cush" wrote: Send us the code and let us know where you are placing it? "Richard" wrote: Hello, I've read dozens of posts regarding this issue however, I am at a loss. It is mandatory that I have the worksheet protected so that data is only entered via VB userform. I have tried the Workbook_Open() and it is not being executed. I replaced the code with a MsgBox and confirmed it is not being run. The macro is being invoked via mouseclick (no shift key). Where else would I place UserInterfaceOnly? Thanks, Richard |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
Confirmed; macros are not set too high. Each time the sheet opens, it asks.
"Tom Ogilvy" wrote: If you are using xl2002 or later and your security is set to high, then macros are disabled without warning unless you have certified your code and your certification has been accepted as a trusted source. If that is what is happening, then I doubt using some other approach is going to overcome it. -- Regards, Tom Ogilvy "Richard" wrote in message ... Hello, I've read dozens of posts regarding this issue however, I am at a loss. It is mandatory that I have the worksheet protected so that data is only entered via VB userform. I have tried the Workbook_Open() and it is not being executed. I replaced the code with a MsgBox and confirmed it is not being run. The macro is being invoked via mouseclick (no shift key). Where else would I place UserInterfaceOnly? Thanks, Richard |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection in VB
I think what he means by placing it, is it is code for a sheet, ie
Sheet1, or in a module, or in the ThisWorkbook module. In order for the Workbook_Open to fire correctly, it needs to be in the ThisWorkbook module. Also make sure that the cells are actually locked, by checking the properties of the cells. Right click cells, Format Cells, Protection tab, the Locked property should be on. *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
WS Protection: Different Levels of Protection on Different Ranges | Excel Discussion (Misc queries) | |||
Cell Protection vs. Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection is gone and only wokbook protection can be se | Excel Discussion (Misc queries) |