Hi All
The file I am working on will be rolled out for use by both our operations people, and every customer that uses our local services; it makes them responsible for the accuracy of detail when creating a data file for upload to our servers with their requirements.
I was stunned, when extracting data from our mainDB to find zero continuity with respect to standard/Referential integrity of certain data, mainly:
Address Line .1
Address Line .2
That said, this file forces all users to use the comboboxes and validations enforce standards across all fields of input.
I disabled much of the workbooks features, including the UI_Ribbon via Workbook_Open() which limits the user to accessing only the Main_Menu_Form I created, which in-turn allows them to navigate to the areas I want them going to.
An avid user can Google the ShiftKey Hack, which is not what I want them to be able to do, for obvious reasons. Many posts regarding this generally point to the following link for disabling it:
http://pixcels.nl/disable-shift-key-on-open/
IMO, it lacks the ability, as the creator, for me to enable the key by way of a Password Input.
I toyed with the following, hence the reason I am here is it doesn't work.
Option_Explicit
Private mbMacrosEnabled As Boolean
Dim myPassword As String
___________________________________________________
Public Function CheckShiftOnOpen()
Dim myPass As String
Dim byPass As Integer
myPassword = "The Password"
If Not mbMacrosEnabled Then
MsgBox "Left-Shift By-pass Functionality is Disabled! Enter Password to Enable.", vbCritical, "Security Warning"
On Error Resume Next
Set myPass = Application.InputBox(Prompt:="Enter Security Code:", Type:=8)
If Not myPass = myPassword Then
byPass = MsgBox("Code Incorrect! Try Again.", vbOKCancel)
If byPass = vbCancel Then Exit Function
With Application
.EnableCancelKey = True '***
End With
End If
End If
End Function
Sub customUIonLoad(ribbon As IRibbonUI)
ThisWorkbook.CheckShiftOnOpen
With Application
.EnableCancelKey = xlDisabled
End With
End Sub
Now, I know that *** ".EnableCancelKey = True" syntax is wrong, I am merely using it as an analogy as to what I am wanting to achieve.
A ShiftKey Password is achievable in Access:
https://stackoverflow.com/questions/32991071/bypass-shift-with-pop-up-password-box
Can anyone suggest a workaround for this please:
As always
TIA
Mark.