Stargazer
10-03-2011, 09:05 AM
Hi,
The old saying stands true: You build a better program and the world makes a better idiot to break it!
We have a workbook that, in a rather complex and convoluted manner, counts down and closes after x-amount of inactivity. This is because the book cannot be shared and must be accessible at all times. We have also built in just about every single possible security and safety system you can think of. This all works, but we now have a new problem to try and get around.
We believe they have managed to stop the clock by opening the VBE and clicking the 'Stop' button. All the code is password protected. Only my colleague and I know it and I know how protective Paul is with his code so I know he's not going to let anyone have the password. But the stop button is accessible without using the code password since it is in the toolbar and not in a module of any sort.
So is there a way to prevent the VBE from being opened?
Our initial thoughts are:-
1) On the timer tick, do a 'For Each' to capture the title of all open windows on the machine and if any of them are like "Microsoft Visual Basic*" then close it.
Hopefully this would veto the VBE before 'they' manage to stop the timer. But we have yet to find a way to get application window titles/captions outside of the Excel container.
2) Hide everything from the formula bar upwards and do a keypreview on Alt+F11.
Messy and makes it obvious that we don't trust the managers as far as we could spit them.
3) Password protection prior to showing the VBE.
Would require a re-work (probably) of Excel's own code and therefore is unlikely.
If you have any ideas or thoughts, I would be interested to hear them.
Regards,
Rob.
The old saying stands true: You build a better program and the world makes a better idiot to break it!
We have a workbook that, in a rather complex and convoluted manner, counts down and closes after x-amount of inactivity. This is because the book cannot be shared and must be accessible at all times. We have also built in just about every single possible security and safety system you can think of. This all works, but we now have a new problem to try and get around.
We believe they have managed to stop the clock by opening the VBE and clicking the 'Stop' button. All the code is password protected. Only my colleague and I know it and I know how protective Paul is with his code so I know he's not going to let anyone have the password. But the stop button is accessible without using the code password since it is in the toolbar and not in a module of any sort.
So is there a way to prevent the VBE from being opened?
Our initial thoughts are:-
1) On the timer tick, do a 'For Each' to capture the title of all open windows on the machine and if any of them are like "Microsoft Visual Basic*" then close it.
Hopefully this would veto the VBE before 'they' manage to stop the timer. But we have yet to find a way to get application window titles/captions outside of the Excel container.
2) Hide everything from the formula bar upwards and do a keypreview on Alt+F11.
Messy and makes it obvious that we don't trust the managers as far as we could spit them.
3) Password protection prior to showing the VBE.
Would require a re-work (probably) of Excel's own code and therefore is unlikely.
If you have any ideas or thoughts, I would be interested to hear them.
Regards,
Rob.